Ciao a tutti ragazzi... sto definendo una matrice "dinamica"...

if request.form(scat_s) = "Si" then
response.write "sottocateg(" & sottocateg_cont & ") = " & scat_id
sottocateg(sottocateg_cont) = scat_id
sottocateg_stat = "ric"
sottocateg_cont = sottocateg_cont + 1
end if


Il risultato è che sulla riga "sottocateg(sottocateg_cont) = scat_id" mi si verifica questo errore...

Errore di run-time di Microsoft VBScript (0x800A0009)
Indice non incluso nell'intervallo


La riga "response.write "sottocateg(" & sottocateg_cont & ") = " & scat_id" come risultato a video mi dà... sottocateg(0) = 4

Dove sta l'errore?