Array Problems

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All,

I am having significant trouble with using Arrays in VBScript. I imagine I
am not initiating the array correctly or something along those lines! The
following code produces the error "Subsript out of range: arrIDs":

Dim arrIDs()

arrIDs() = Split(strTest,",")

''''''
The UBound function also produces the same error. Is there something wrong
with my code or maybe my system?? Any help is greatly appreciated.
Dan
 
VBScript can be a bit tricky: Try it like this:

Dim arrIDs
arrIDs = Split(strTest,",")
MsgBox UBound(arrIDs)
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Thanks again, that did the job.

Sue Mosher said:
VBScript can be a bit tricky: Try it like this:

Dim arrIDs
arrIDs = Split(strTest,",")
MsgBox UBound(arrIDs)
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top