Name Property Cannot Be Set When Using Implicit PropertyLast reviewed: June 21, 1995Article ID: Q93214 |
The information in this article applies to:
SUMMARYOn Page 126 of the Visual Basic Programmer's Guide, it incorrectly states that all controls have an implicit property you can use for storing or retrieving values. Some controls supplied with the Professional Edition of Visual Basic for Windows use the Name property as their implicit property, which you cannot use at run-time.
MORE INFORMATIONThe following controls from the Visual Basic Professional Edition use the Name property as their implicit property:
Common dialog MAPI session MAPI message Spin buttonAttempting to access the implicit property of these controls results in one of the following errors:
'Name' property cannot be read at run time 'Name' property cannot be set at run timeYou access the implicit property of a control (also known as the "value of a control" or the "default value of a control") by writing the control name with no property. For example, with a text box named Text1, you can write the following statement to assign a value to the Text property:
Text1 = "hello world"The following list shows the implicit properties for all the controls in both the Standard and Professional Editions:
Standard Control Implicit Property Check box Value Combo box Text Command button Value Directory list box Path Drive list box Drive File list box FileName Frame Caption Grid Text Image Picture Label Caption Line Visible List box Text Menu Enabled OLE client Action Option button Value Picture box Picture Scroll bar vertical Value Scroll bar horizontal Value Shape Shape Text box Text Timer Enabled Professional Control Implicit Property 3D check box Value 3D command button Value 3D frame Caption 3D group push button Value 3D option button Value 3D panel Caption Animated button Value Common dialog Name (not usable) Communications Input Gauge Value Graph QuickData Key status Value MAPI session Name (not usable) MAPI message Name (not usable) Masked edit Text Multimedia MCI Command Pen BEdit Text Pen HEdit Text Pen ink on bitmap PicturePen on-screen keyboard Visible Picture clip Picture Spin button Name (not usable) |
Additional reference words: 2.00 docerr
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |