Word 7 Calendar Wizard Creates One Month Only

ID: Q141876

The information in this article applies to:

SYMPTOMS

The Calendar Wizard creates only the starting month specified in the wizard, instead of creating a calendar for a whole year.

CAUSE

One of the instructions in the Wizard is implemented incorrectly. Specifically, the variable specified for the MaxValidYear in the wizard is not a shared variable.

WORKAROUND

WARNING: ANY USE BY YOU OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this macro code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

The Calendar Wizard has a variable called MaxValidYear which is not shared, causing the Calendar Wizard to complete incorrectly when the Starting Year and Ending Years are different. The MaxValidYear variable needs to be a shared variable.

To change the MaxValidYear to a shared variable, perform the following steps:

1. Click New on the File menu.

2. Select the Calendar Wizard from the "Other Documents" tab. (Do not

   double-click the Calendar Wizard icon.)

3. Press and hold the SHIFT key, then click OK. Keep the Shift key pressed
   down until a new blank document appears on the screen.

4. Select Macro from the Tools menu.

5. Select the StartWizard macro and click Edit.

6. Find the "Dim MaxValidYear" statement. It should be the 10th DIM

   statement at the top of the wizard.

7. Change the "Dim MaxValidYear" statement to read "Dim Shared
   MaxValidYear".

8. Click Save on the File menu.

9. Click Close on the File menu. If prompted to save the StartWizard

   macro, choose Yes.

STATUS

Microsoft has confirmed this to be a problem in the Word versions listed above. This problem was corrected in Microsoft Word 97 for Windows.

MORE INFORMATION

This behavior of the Calendar Wizard does NOT occur with any previous version of Microsoft Word for Windows, Microsoft Word for Macintosh, or Microsoft Word for Windows NT.

KBCategory: kbusage fixlist97 KBSubcategory: Additional reference words: word95 word7 7.0 7.0a winword

Version           : 7.0 7.0a
Platform          : WINDOWS

Last Reviewed: January 20, 1999