<% ' this code Dim a_array(100) ' this code will fail x=100 Dim my_array(x) %> Assigning an Array size With a variable produces an Error unless the ReDim command Is used. arraysredimcorrect.asp <% Dim my_array() x=100 ReDim preserve my_array(x) my_array(20)="Hi!" my_array(40)="How are You" lowcount=LBound(my_array) highcount=UBound(my_array) Response.Write "lowcount=" & lowcount & ";highcount=" & highcount & "

" For counter=lowcount To highcount Response.Write counter & " " Response.Write my_array(counter) & "
" Next %>