PRJ: Toolbar Button Not Upgraded If Assigned to SendKeys (170714)
The information in this article applies to:
- Microsoft Project 2000
- Microsoft Project 98 for Windows
This article was previously published under Q170714 SYMPTOMS
When you upgrade to Microsoft Project 98 or later, some of the toolbar buttons may not be upgraded correctly and will not be available.
CAUSE
This behavior occurs when you a button is assigned to the SendKeys command.
This command is no longer available for buttons in Microsoft Project 98 or later.
WORKAROUNDMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
To work around this problem, use the SendKeys command in a Visual Basic macro and assign this macro to a toolbar button. To do this, follow these steps:
- On the Tools menu, point to Macro, and then click
Macros.
- In the Macro Name box, type SendKeys,
and click Create.
- In the Visual Basic Editor, enter the following line of code:
SendKeys "{Enter}"
The code window should look like this:
Sub SendKeys()
SendKeys "{Enter}"
End Sub
- On the File menu, click Save.
- On the File menu, click Close and Return to
Microsoft Project.
After you create the macro, link it to a toolbar button, using these steps:
- On the Tools menu, point to Customize, and then click
Toolbars.
- Click the Commands tab.
- In the Categories list, select All Commands. In the
Commands list, drag the SendKeys macro to one of the
toolbars.
NOTE: If you want to edit or change the button image,
right-click the SendKeys button and click the appropriate
command on the menu that appears. - Click Close.
STATUS
Microsoft has confirmed this to be a problem in the versions of Microsoft
Project listed above.
Modification Type: | Major | Last Reviewed: | 6/23/2005 |
---|
Keywords: | kbinterop kbprb kbsetup KB170714 |
---|
|