Microsoft KB Archive/81863

{|
 * width="100%"|

WD: ShowVars Command Doesn't Display Array Variables

 * }

Q81863

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
 * Microsoft Word for Windows, version 7.0
 * Microsoft Word for the Macintosh, versions 6.0, 6.0.1

-

SYMPTOMS
In Microsoft Word, the WordBasic command ShowVars does not display numeric or string-array variables. It displays only single- value-numeric or string variables.

WORKAROUND
The following word Basic code segment illustrates how to view the content of an array while the macro is running.

  dim num(100) dim alpha(100)

msgbox &quot;the cell you want to see&quot; + Str$(num(x)) MsgBox &quot;the cell you want to see&quot; + alpha(x) Where x is the number of the cell of interest. For small array it may be feasible to use a For Next loop to view the contents of the entire array.

STATUS
This is by product design.