Solved

Error when declaring an array - "integer constant expected" 0x800A0402

Posted on 2003-11-06
4
408 Views
Last Modified: 2012-06-21
I'm trying to declare an array whose size is based on other arrays, but get an error, as listed in question title. Can anyone shed light on this? Here's the code:

first array declared, such as:
Dim CountryArray
CountryArray = Array("Australia","USA","England","Iraq","Istambul","Yugoslavia")

Here's the one I get the error with:
Dim MDPArray(((UBound(CountryArray)+1)*3)-1,13)

TIA
0
Comment
Question by:Chris_Granger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 52

Accepted Solution

by:
Ryan Chong earned 100 total points
ID: 9699008
Try:

Dim MDPArray
Redim MDPArray(((UBound(CountryArray)+1)*3)-1,13)

cheers
0
 

Author Comment

by:Chris_Granger
ID: 9699030
That works fine, thanks!  Not sure why it doesn't work the other way but....
0
 
LVL 58

Expert Comment

by:Gary
ID: 9699031
Use ReDim instead of Dim, you can't dynamically set an array that way.
0
 
LVL 58

Expert Comment

by:Gary
ID: 9699038
Hmm reloaded question and nothing here.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question