A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Array Problems



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 21st 07, 03:19 PM posted to microsoft.public.outlook.program_forms
Dan Allason
external usenet poster
 
Posts: 7
Default Array Problems

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
  #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

  #3  
Old February 21st 07, 04:43 PM posted to microsoft.public.outlook.program_forms
Dan Allason
external usenet poster
 
Posts: 7
Default Array Problems

Thanks again, that did the job.

"Sue Mosher [MVP-Outlook]" wrote:

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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Import Excel file to array to fill ComboBox Pentoast Outlook - Using Forms 9 December 19th 06 07:08 PM
Convert Outlook.Attachment to Byte() array Steller Add-ins for Outlook 1 July 26th 06 10:48 PM
Array of outlook items....HELP!! WhytheQ Outlook and VBA 5 June 26th 06 02:52 PM
Download free program for array phone codes correction Victor Bilous Outlook - General Queries 5 February 1st 06 10:18 PM
Download free program for array phone codes correction Victor Bilous Outlook - Using Contacts 0 January 31st 06 08:20 AM


All times are GMT +1. The time now is 09:25 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.