7 Replies Latest reply on Mar 29, 2017 1:12 PM by Cad Admin

    VBA Runtime Error '9', Subscript out of range error

    Cad Admin

      I have a macro that i have used for some time.  No issues.  I wanted to make some updated to it.  I open the macro, WITHOUT making any change VBA Runtime Error '9', Subscript out of range error.  I don't get the error or crash if i just use the macro.

       

       

      The function throwing the code (stops on the BOLD line):

       

      Private Sub PopulateDrawingList()

         For i = 0 To UBound(2DDRAWINGS)

            tmpstr = ""

            If ChKB_Pre Then

              j = CInt(Left(PARENTLIST(i), 1))

              For k = 2 To j

                tmpstr = tmpstr & ".  "

              Next

            End If

            Lb.AddItem (tmpstr & 2DDRAWINGS(i))

          Next

      End Sub

       

       

      Any Thoughts....