Array Problems

D

Dan Allason

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
 
S

Sue Mosher [MVP-Outlook]

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
 
D

Dan Allason

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top