The information in this article applies to:
SUMMARYThis article discusses the keystrokes needed to close the dialog box displayed when using the InputBox command. MORE INFORMATIONWord 98 Macintosh EditionThe Visual Basic for Applications InputBox command accepts only one line of text. Pressing ENTER (RETURN in Word for the Macintosh) closes the InputBox dialog box.For more information about InputBox, from the Visual Basic for Applications Editor, click the Office Assistant, type "InputBox," click Search, and then click to view "InputBox." NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If the Assistant is not able to answer your query, please see the following article in the Microsoft Knowledge Base: Q176476 OFF: Office Assistant Not Answering Visual Basic Questions Word 6.x, 7.xIn Word 6.x-7.x, you can enter a new line by pressing ENTER (RETURN in Word for the Macintosh), but as a result, this key will not click the OK button.To close an InputBox$() in Word 6.x-7.x, you must press the TAB key and then press ENTER. The TAB key moves the focus to the OK button so that when you press the ENTER key, the dialog box is closed. Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web: http://www.microsoft.com/supportnet/refguide/If you want the user to type a single line of data and be able to press the ENTER key to close the dialog box, you can use a WordBasic user-defined dialog box instead of an InputBox, for example:
If your dialog box needs to use a multiple line edit box, you can add a
shortcut key to the OK button using a WordBasic Dialog function. The OK
button shortcut key allows you to close the dialog box without using the
mouse (press ALT+O), for example:
Word 2.xIn Word 2.x, you pressed SHIFT+ENTER to enter a new line in an Inputbox$. Pressing ENTER closes the Inputbox dialog box.Additional query words: InputBox$() input box paragraph enter newline
Keywords : kbmacro kbprg kbdta kbdtacode wordnt kbmacroexample macword98 winword ntword macword word6 word7 word95 |
Last Reviewed: December 23, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |