Article ID: 189868
Article Last Modified on 1/23/2007
APPLIES TO
- Microsoft Project 2000 Standard Edition
- Microsoft Project 98 Standard Edition
This article was previously published under Q189868
SYMPTOMS
In Microsoft Project, when you run a recorded macro to open a project
that shares resources from a resource pool, you may receive the following
error:
Run Time Error '1100':
The method is not available in this situation.
CAUSE
This behavior occurs when all of the following conditions are true:
- You have recorded a macro that opens a project sharing a resource
pool.
- When opening that project file you receive the Open Resource Pool
message box, you chose one of the options that will open the
resource pool.
The resulting macro will look similar to this:
Sub OpenFileTest()
WindowActivate WindowName:="<X>"
FileOpen Name:="<X>", ReadOnly:=False
End Sub
NOTE: <X> is the path and file name of the project you are opening.
Running this macro produces an error because you cannot activate a window
(WindowActivate) for a specific file if the file has not yet been opened
(FileOpen).
WORKAROUND
To work around this behavior, follow these steps:
- From the Tools menu, point to Macro, then click
Macros.
- In the Macros dialog box, click the name of your macro from
the list of macros, then click Edit.
- Find the following lines in your macro:
WindowActivate WindowName:="<X>"
FileOpen Name:="<X>", ReadOnly:=False
NOTE: <X> is the path and file name of the file you are opening.
- Delete the whole line that begins with
WindowActivate
- On the File menu, click Close and return to
Microsoft Project.
- Run the macro normally.
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
MORE INFORMATION
When recording the macro, if you click Do Not Open Other Files in Open Resource Pool Information, the macro will be recorded correctly and will run successfully.
Additional query words: prj2000
Keywords: kbbug kberrmsg kbpending KB189868