Thread: Array Problems
View Single Post
  #2  
Old February 21st 07, 03:22 PM posted to microsoft.public.outlook.program_forms
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Array Problems

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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Dan Allason" wrote in message ...
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

Ads