Microsoft Knowledge Base |
|
XL: Can't Use Dialog Method to Bring Up Spelling Dialog Box |
|
|
Last reviewed: June 20, 1997
Article ID: Q112771 |
|
The information in this article applies to:
SYMPTOMIn Microsoft Excel, the Dialogs method in Visual Basic, Applications Edition, can be used to display over 200 built-in dialog boxes. However, the Spelling tool dialog box cannot be shown using the Dialogs method.
CAUSEThe Spelling tool dialog box cannot be shown using this method because it does not have a defined constant in Microsoft Excel.
WORKAROUNDThis problem only affects the ability to display the dialog box for the Spelling tool. You can run the Spelling tool by using the CheckSpelling method as in the following example:
ActiveSheet.CheckSpelling MORE INFORMATIONThe Dialogs method can be used to display various built-in Microsoft Excel dialog boxes. For example, the following Visual Basic, Applications Edition, procedure uses the Dialogs method and the constant xlDialogOpen to show the Open dialog box (the dialog box you get when you choose Open from the File menu): Microsoft provides examples of Visual Basic for Applications procedures 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. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft support engineers can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.
Sub ShowFileOpen()
Application.Dialogs(xlDialogOpen).Show
End Sub
To look up constants with the Object Browser
For more information about using constants in Microsoft Excel and Visual Basic, query on the following words in the Microsoft Knowledge Base:
appnote and constants and using and visual and basic REFERENCES"Visual Basic User's Guide," version 5.0, page 236
|
|
Additional query words: 5.00 7.00 msapps
©1997 Microsoft Corporation. All rights reserved. Legal Notices. |