Knowledge Base

PRJ: Macro with CTRL+HOME or CTRL+END Not Recorded Properly

Article ID: 137663

Article Last Modified on 1/19/2007


APPLIES TO


This article was previously published under Q137663

SYMPTOMS

In Microsoft Project, if you create a macro by recording the keystroke CTRL+HOME or CTRL+END, the resulting macro selects the tasks from the active cell to the beginning or end of the project, depending on the keystroke you recorded.

CAUSE

When you record the keystroke CTRL+HOME or CTRL+END, the recorder adds Extend:=True to the end of the SelectTaskField method, as in the following example:
   SelectTaskField Row:=-5, Column:="Name", Extend:=True
				

WORKAROUND

To work around this behavior, modify the "SelectTaskField Row:=" line in the macro to the following:
   SelectTaskField Row:=-5, Column:="Name"
				
To edit the macro, use the following steps:

Project 98

  1. On the Tools menu, point to Macro and then click Macros.
  2. In the Macro list, select the macro you want to modify and then click Edit.
  3. Locate the line that contains "SelectTaskField" and remove the following code:
       , Extend:=True
    					

Project, versions 4.0, 4.1

  1. On the Tools menu, click Macros.
  2. Click the recorded macro, and click Edit.
  3. Locate the line that contains "SelectTaskField" and remove the following code:
       , Extend:=True
    					

STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Project listed above.

Additional query words: key stroke keystrokes keypress macro recorder strokes

Keywords: kbbug kbcode kbmacro kbpending KB137663