Skip to main content
Inspiring
August 9, 2006
Question

Can you dimension an array with a variable value?

  • August 9, 2006
  • 2 replies
  • 252 views
I would like to dimension an array with a variable value, like in the
example of the two dimensional array below:

dim FrequencyArray(FrequencyCount,3)

But I get the error message "Expected integer constant" when I try it. Is
there a trick to doing this?


This topic has been closed for replies.

2 replies

Inspiring
August 9, 2006
I found out the workaround, you declare it and then redimension it with the
variable value:

Dim FrequencyArray()
Redim FrequencyArray(FrequencyCount,3)


Inspiring
August 9, 2006
http://www.4guysfromrolla.com/webtech/102898-1.shtml

HTH,

Jon

"Mike Z" <mikeyz@rocktmail.com> wrote in message
news:ebcu9v$jfq$1@forums.macromedia.com...
>I would like to dimension an array with a variable value, like in the
>example of the two dimensional array below:
>
> dim FrequencyArray(FrequencyCount,3)
>
> But I get the error message "Expected integer constant" when I try it. Is
> there a trick to doing this?
>