The information in this article applies to:
SYMPTOMSIn Microsoft Excel, when you create a custom dialog box, if you use the Focus method in a Microsoft Visual Basic for Applications procedure to set the focus of the dialog box to a specific control, the control that you specify may not have the focus when you display the dialog box. CAUSEThis behavior occurs under the following conditions: Microsoft Excel for the Macintosh
Microsoft Excel for the Macintosh or for Windows
WORKAROUNDMicrosoft 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/support/supportnet/overview/overview.aspTo work around this behavior in Microsoft Excel for the Macintosh, use the Focus method to set the focus to an edit box in the dialog box, and assign the procedure that contains the Focus method to the dialog frame. To work around this behavior in Microsoft Excel for Windows, assign the procedure that contains the Focus method to the dialog frame. The following is an example of how to set the focus in a custom dialog box using the Focus method in Microsoft Excel for either platform: Example
MORE INFORMATION
You can use the Focus property in a Visual Basic procedure to set the focus
of a dialog box that is displayed. The control on the dialog box that has
the focus is where user keyboard input is directed. The focus is indicated
by a flashing cursor or highlighted text within an edit box with the focus,
or, in Microsoft Excel for Windows only, by a dashed rectangle around the
control or around the selection within the control.
Q127790 MXL5: Can't Set Tab Order for Control Other Than Edit Box REFERENCESFor more information about the Focus property, choose the Search button in MS Excel Visual Basic Help and type: focus in dialog boxes Additional query words: 5.00c
Keywords : kbcode kbprg PgmCtrlsStd |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |