Microsoft KB Archive/93214

= Name Property Cannot Be Set When Using Implicit Property =

Article ID: 93214

Article Last Modified on 10/30/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 2.0 Standard Edition

-



This article was previously published under Q93214



SUMMARY
On 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 INFORMATION
The following controls from the Visual Basic Professional Edition use the Name property as their implicit property:

Common dialog

MAPI session

MAPI message

Spin button

Attempting 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 time

You access the implicit property of a control (also known as the &quot;value of a control&quot; or the &quot;default value of a control&quot;) 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 = &quot;hello world&quot; 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      Picture Pen on-screen keyboard Visible Picture clip           Picture Spin button            Name (not usable)

Additional query words: 2.00 docerr

Keywords: KB93214

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.