Can't Format Control Text in Objects Such As EditBox and Range

Last reviewed: February 2, 1998
Article ID: Q113599
The information in this article applies to:
  • Microsoft Excel for Windows, version 5.0
  • Microsoft Excel for the Macintosh, version 5.0
  • Microsoft Excel for Windows 95, version 7.0

SUMMARY

In Microsoft Excel, you can use the Characters method with some objects to return a range of characters in the object text. This procedure allows you to format characters in a text string.

Both the Object Browser and Visual Basic Help indicate that the Characters method applies to the following objects:

   AxisTitle
   Button
   Buttons
   ChartTitle
   CheckBox
   CheckBoxes
   DataLabel
   DialogFrame
   DrawingObjects
   DropDown
   DropDowns
   EditBox
   EditBoxes
   GroupBox
   GroupBoxes
   Label
   Labels
   OptionButton
   OptionButtons
   Range
   TextBox
   TextBoxes

The text for controls such as edit boxes and check boxes cannot be formatted; therefore, the Characters method cannot be applied to the objects for these controls.

The Characters method may be applied only to the following objects:

   AxisTitle
   Button
   Buttons
   ChartTitle
   DataLabel
   DropDowns
   Range
   TextBox
   TextBoxes

NOTE: You cannot use the Characters method to change character formatting for a DropDown object; however, you can use the Characters method to set or return characters for the text in a combination drop-down edit box.


Additional query words:
Keywords : kbprg
Version : WINDOWS:5.0,7.0; MACINTOSH:5.0
Platform : MACINTOSH WINDOWS
Issue type : kbdocerr


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.