I’m attempting to create and fill in a two-dimensional array in VBScript, which resides in an ASP page. I have the following code:
Dim array(11, 6)
For record = 0 To 6
array(6, record) = 8
array(7, record) = "test"
Next
array(6, 3) = 8
array(7, 3) = "test"
The for loop doesn’t work, though. Nothing gets filled in. If I do it explicitly, like the code after the loop, that works just fine.
I’ve hardly ever used VBScript before but this seems like it should work. Why is my loop not doing anything?
Your “doesn’t work” doesn’t work. You’ll have to describe exactly what you expect and what happens instead. Otherwise –
Is there an evil “On Error Resume Next” active?
WRT the OERN:
You could insert an “On Error GoTo 0” immediately before the critical/new code and continue driving with your eyes shut with an “On Error Resume Next” immediately after it.
Or: copy the new code into a clean/empty .vbs to be used by cscript.exe
Or: post the relevant part of the code completely.