title: "subscript out range" error (vbscript on pageload)
body: <p>my name is Edd and I need your help. This error occurs on page load in my classic ASP application:</p>
  
  <pre>Microsoft VBScript runtime error  '800a0009' 
  Subscript out of range: 'cont' 
  /admin/cadastros_apz_material.asp, line 173 
  </pre>
  
  <p>The associated code is:</p>
  
  <pre><code>do while not rs.eof
    for i = 1 to tpp
       if i = 1 then matriz(cont) = Rs("id_material_apv_produto") else matriz(cont) = matriz(cont) &amp; "_" &amp; rs("id_material_apv_produto")
       rs.movenext: if rs.eof then exit do
     next: cont = cont + 1
  loop: set rs = nothing: if cint(pag) = 1 and ubound(matriz) &gt;= 1 then id = matriz(1)
  </code></pre>
  
  <p>Thanks.</p>