The information in this article applies to:
SYMPTOMSWhen you open Newmacro.doc, included with Word for Windows 2.0, you may receive the following WordBasic error message when the AutoOpen macro runs: This problem does not occur when you open the NewMacro.doc file in Word 97. Instead Word 97 alerts you that the macros will not be converted when you open the template in Word 97. CAUSE
The "Subscript out of range" error message refers to an array element with
a subscript outside the defined dimensions of the array, or an array
element that has the wrong number of subscripts. For example, the subscript
for the array element variable "Item$(2)" is 2, which means the element is
to occupy the third position in the array. If the array has been
dimensioned to contain only one element, as in the statement "Dim
Item$(0)," specifying the variable "Item$(2)" in the macro will generate
the "Subscript out of range" error message because it references a third
position in the array when there is only one position available.
RESOLUTION
Change the number in the cAutoMacros=20 line to 2 less than the total
number of macros in Newmacro.doc that begin with "Auto."
REFERENCES
"Using WordBasic," by WexTech Systems, page 341
Additional query words: winword2 2.0 6.0 winword 7.0 word95 word7 word6
Keywords : |
Last Reviewed: December 28, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |