PDA

View Full Version : dimming array with variable


esthera
08-23-2006, 09:57 AM
what's wrong with this?


totalsites=5
dim arrsitename(totalsites)

corics15
08-23-2006, 10:30 AM
what's wrong with this?


totalsites=5
dim arrsitename(totalsites)

try this:

arrsitename = array("site1", "site2", "site3", "site4", "site5"):D

mehere
08-23-2006, 04:25 PM
try this:
dim arrsitename()
totalsites = 5
redim arristename(totalsites)
If you want to increase the size of any array without losing the data it holds
use redim preserve instead of redim.