Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 15th, 2006, 06:03 AM
buffyslay buffyslay is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Sussex, UK
Posts: 2 buffyslay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 51 sec
Reputation Power: 0
Angry Argh! Multi Dim Array

hi all
am having complete nightmare....
subscript out of range

ReDim arrEmailAdd(lRowCountRef - 1, lRowCountRef - 1) ' declares the array variable with the necessary size
Range("E2").Select
Dim zz As Variant
z = LBound(arrEmailAdd)
x = LBound(arrEmailAdd)
z = 2
x = 2
For zz = LBound(arrEmailAdd) To UBound(arrEmailAdd)
arrEmailAdd(z) = ActiveCell.Value
arrEmailAdd(x) = ActiveCell.Offset(0, -3).Value
ActiveCell.Offset(1, 0).Select

z = z + 1
x = x + 1
Next


i have tried a million different ways and ALWAYS get the same error!!!

Reply With Quote
  #2  
Old February 15th, 2006, 09:33 AM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,747 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 43 m 27 sec
Reputation Power: 1914
that's because you made the array 2-D array, with two dimensions,
but you try to use it as one dimension array.

I could not really decipher the logic you're using there in the loop,
but instead of those lines:
Code:
rrEmailAdd(z) = ActiveCell.Value
arrEmailAdd(x) = ActiveCell.Offset(0, -3).Value

you can have such line for example:
Code:
 arrEmailAdd(z, x) = ActiveCell.Value
 arrEmailAdd(x, z) = ActiveCell.Offset(0, -3).Value

or use two "normal" arrays instead of one 2D array.
what exactly are you trying to do here?

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Argh! Multi Dim Array


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT