The information in this article applies to:
SUMMARYThe Visual C++ documentation shows an incorrect syntax for setting the ActiveConfiguration and ActiveProject properties. For example, the following macro written in Visual Basic Scripting Edition:
causes the following run-time error:
This error gives the impression that the property is read-only which is not the case. Use the following syntax instead:
MORE INFORMATIONThe ActiveProject propertyThe ActiveProject Property topic in the Visual C++ documentation (see REFERENCES section) incorrectly shows the syntax for setting the ActiveProject property. It states:
where object is an expression that evaluates to an Application object and
string is the name of the project minus any file extension. When you access
the ActiveProject property of the Application object, you can omit object
because the name of the Application object is implied when you access its
properties and methods.If you use the following VBScript macro:
the following error occurs:
This error gives the impression that the property is read-only which is not the case. Use the following syntax for setting the ActiveProject property instead:
where string is the name of a project contained in the current workspace
minus any file extension. It is case sensitive.The following is an alternative syntax:
where n is an integer from 1 to the total number of projects in the current
workspace.Another alternative is:
where prj is a variable already set to a project object.
The ActiveConfiguration propertyThe ActiveConfiguration Property topic in the Visual C++ documentation (see REFERENCES section) incorrectly shows the syntax for setting the ActiveConfiguration property. It states:
where object is an expression that evaluates to an Application object and
string is the name of a valid configuration in the active project. When you
access the ActiveConfiguration property of the Application object, you can
omit object because the name of the Application object is implied when you
access its properties and methods.If you use the following VBScript macro:
the following error occurs:
This error gives the impression that the property is read-only which is not the case. Use the following syntax for setting the ActiveConfiguration property:
where n is an integer from 1 to the total number of configurations in the
active project.An alternative syntax is:
where n is an integer from 1 to the total number of configurations in the
active project.Another alternative is:
where config is a variable already set to a configuration object.
REFERENCESVisual C++ Books Online: Developer Studio Environment User's Guide; Automating Tasks in Developer Studio; Developer Studio Objects; Reference: Developer Studio Objects; Properties; ActiveProject Property
Visual C++ Books Online: Developer Studio Environment User's Guide;
Automating Tasks in Developer Studio; Developer Studio Objects; Reference:
Developer Studio Objects; Properties; ActiveConfiguration Property
Additional query words: kbAutomation kbIDE kbVC500
Keywords : kbdocerr |
Last Reviewed: July 30, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |