Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invalid Subscript Reference?
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01398795
Message ID:
01398800
Views:
82
What's the value of nMarks at the time of error? Is it 0?

>In an application that has run without errors for several years, we've suddenly started getting an "invalid subscript reference" error in the Word automation routine. It occurs on the Dimension command. The value of nMarks varies between 2 and 20 so I doubt the array is too large. I have been unable to duplicate the error in my office, but can easily produce it by running the application on the client's server (via Terminal Services.) Any idea what has happened?
>
>
>nMarks = oDocCopy.bookmarks.count()			&& count the number of bookmarks; 
>
>DIMENSION aMark[nMarks]				&& error happens here
>FOR i = 1 TO nMarks
>	aMark(i) = UPPER(oDocCopy.bookmarks(i).name)          && store bookmark names in the array
>ENDFOR
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform