title: Microsoft VBScript runtime error '800a0009' ASP
body: <p>I need your help please . This error occurs on adding the items in the shopping cart in my classic ASP application (is not always)</p>
  
  <pre><code>Microsoft VBScript runtime
  error '800a0009'
  Subscript out of range
  /agrega_carrito.inc, line 71
  </code></pre>
  
  <p>This is the code from file, lines 56 - 86</p>
  
  <pre><code>if IsEmpty(Session("arrcarrito")) then
  'Create shopping cart
  Dim arrcarrito()
  Redim arrcarrito(6, 1)
  arrcarrito (0, 0) = idprod
  arrcarrito (1, 0) = color
  arrcarrito (2, 0) = talla
  arrcarrito (3, 0) = cantidad
  arrcarrito (4, 0) = precio
  arrcarrito (5, 0) = peso
  Session("arrcarrito") = arrcarrito
  Else
  'Add items to shopping cart
  arrcarrito = Session("arrcarrito")
  tamano_arr = Ubound(arrcarrito, 2)
  Redim Preserve arrcarrito (6, tamano_arr + 1)   &lt;- line 71
  arrcarrito (0, tamano_arr) = idprod
  arrcarrito (1, tamano_arr) = color
  arrcarrito (2, tamano_arr) = talla
  arrcarrito (3, tamano_arr) = cantidad
  arrcarrito (4, tamano_arr) = precio
  arrcarrito (5, tamano_arr) = peso
  Session("arrcarrito") = arrcarrito
  end if
  arrcart = Session("arrcarrito")
  l = 0
  r = UBound(arrcart,2) - 1
  s = UBound(arrcart,1)
  Call QuickSort(arrcart, l, r, 1, s)
  Session("arrcarrito") = arrcart
  </code></pre>
  
  <p>Thanks !!</p>