Microsoft KB Archive/113150

Module Editor View Empty w/ More Than 15 Project Windows Open

PSS ID Number: Q113150 Article last modified on 09-19-1995

4.00 4.10 | 4.00

WINDOWS | MACINTOSH

= SYMPTOMS =

In Microsoft Project, if you open more than 15 project windows, and you apply the Module Editor view in each window, in any subsequent window you open, the Module Editor view is empty, and you cannot enter any code.

NOTE: This is not a problem using Visual Basic module sheets in Microsoft Excel version 5.0.

= STATUS =

Microsoft has confirmed this to be a problem in Microsoft Project 4.0 for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

= WORKAROUND =

To edit or display code in the Module Editor view when you have more than 15 open project windows, with the Module Editor view displayed in each window, do either of the following:

  Close one of the project windows. -or-   In one of the project windows, apply a view other than the Module Editor view. 

= MORE INFORMATION =

In Project, when you create and edit macros, it is sometimes convenient to display a number of macros, each in its own window. For example, if you have three macros stored in Project1 and you want each macro displayed so that you can switch between the macros, you can open Project1 in a new window and display a different macro in that window. To do this, use the following steps:


 * 1) Open Project1. From the Window menu, choose New Window.
 * 2) From the Projects list, select Project1. From the View list, select Module Editor and choose OK.
 * 3) From the Module list on the Visual Basic Toolbar, select the macro you want to display.

You can repeat these steps for each macro you want to display in a new window. However, you can only display the Module Editor view in 15 windows at a time.

NOTE: This behavior does not depend on how many project files are open, only the number of windows open with the Module Editor view active.

Steps to Reproduce Behavior
In Microsoft Project, open 20 project files, and apply the Module Editor view in each project. The following steps automate this process for you:

  From the Tools menu, choose Options. Select the View tab, and from the Default View list, select Module Editor. Choose OK.   From the Views menu, choose More Views. From the Views list, select Module Editor, and choose the Apply button.   From the Tools menu, choose Macros. In the Macros dialog box, choose New. In the Macro Name box, type “Create_New_Project” (without the quotation marks). Choose the Options button, and under Store Macro In, select the Current Project File option and choose OK. Edit the macro so that it appears as follows: Sub Create_New_Project ’ Define variable x as type Integer Dim x as Integer ’ Loop through FileNew command 19 times For x = 1 To 19 FileNew Next x End Sub   From the Visual Basic toolbar, choose the Run Macro button. 

Note that the last five files opened display the Module Editor view with no cursor and no text. Additionally, you cannot enter any code in these windows. Only the first 15 files opened contain text in the Module Editor view and can be edited.

Microsoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided ‘as is’ and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose. Note that a line that is preceded by an apostrophe introduces a comment in the code–comments are provided to explain what the code is doing at a particular point in the procedure. Note also that an underscore character (_) indicates that code continues from one line to the next. You can type lines that contain this character as one logical line or you can divide the lines of code and include the line continuation character.

KBCategory: kbprb KBSubcategory:

= Additional reference words: 4.00 =

Copyright Microsoft Corporation 1995.