The information in this article applies to:
SYMPTOMS
TextBox, ComboBox, and ListBox controls do not display data in numeric
Formats, for example:
CAUSETextBox ControlIf you create a TextBox control on a worksheet and you set the LinkedCell property to a cell with a number format, the number format is not used in the TextBox control.ComboBox ControlIf you create a Combo Box control on a worksheet or a UserForm, and you set the ListFillRange property (for a worksheet) or the RowSource property (for a UserForm) to a range of cells, the drop-down list uses the number format in that range, but the selected value does not.ListBox ControlIf you create a ListBox control on a UserForm, and you set the RowSource property of the ListBox control to a range of cells, the items in the ListBox control use the number formats in that range, but the value property of the ListBox control does not.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.asp TextBox ControlTo link a TextBox control to a worksheet cell, use a TextBox control from the Drawing toolbar instead of the Control Toolbox toolbar.ComboBox ControlTo use a ComboBox control containing a range of cells on a worksheet, use a ComboBox control from the Forms toolbar instead of the Control Toolbox toolbar.If you are using a ComboBox control on a UserForm, use a macro for the Change event to set the Value property of the ComboBox control. The following example uses a ComboBox control and a macro for the Change event:
ListBox ControlIf you have a ListBox control on either a UserForm or a worksheet, use a macro similar to the one for the ComboBox control to display the selected value for the ListBox control. For example, follow these steps:
STATUSMicrosoft has confirmed this to be a problem in Microsoft Excel 97 for Windows. REFERENCES
For more information about TextBox, ComboBox, and ListBox controls, click
the Office Assistant, type controls, click Search, and then click to view
"Add buttons, check boxes, or other controls to a worksheet."
Q120802 Office: How to Add/Remove a Single Office Program or Component Additional query words: XL97
Keywords : kbprg kbtool kbdta kbdtacode xldraw KbVBA |
Last Reviewed: November 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |