PRB: Developer Studio Macro's ExecuteCommand Requires Quotes (181504)
The information in this article applies to:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q181504 SYMPTOMS
A VBScript macro ExecuteCommand method does not perform its specified
command. Instead, it may perform an unexpected command or have no effect at
all. Often, the macro generates no error messages.
CAUSE
The ExecuteCommand method takes one parameter--the keyword that Developer
Studio will attempt to execute. If this keyword is not enclosed in
quotation marks, the problems above may occur.
RESOLUTION
Enclose the command keyword following the ExecuteCommand method in
quotation marks.
If this does not correct the problem, verify that the command is valid:
- Click Customize on the Tools menu.
- Click the Keyboard tab.
- In the drop-down box labeled Category, select All Commands. Make sure
that the command appears in the "Commands" list box.
Finally, check to see whether the command would be enabled at the point
that the macro calls it. For example, the following statement activates the
Project Settings dialog box:
ExecuteCommand "ProjectSettings"
However, if there is no active project when the macro executes, that
command will have no effect.
For additional information, please see the following article in the
Microsoft Knowledge Base:
165681 INFO: Visual C++ 5.0 Readme, Build Issues
REFERENCES
"ExecuteCommand Method," Visual C++ Online Books
Modification Type: | Major | Last Reviewed: | 12/2/2003 |
---|
Keywords: | kbAutomation kbFAQ kbide kbprb KB181504 |
---|
|