Subscript out of range is a common run-time error.
It could mean that you are now using external data to index an array, and that the number is not what was expected.
If you are certain that you are always testing your data for sanity, then I suggest a trace log. There is a logging facility in VB, but it doesn't work in design mode, so I use a simple procedure. It starts a new one each day for easier management.
Sub WriteLog(Text As String)
Dim f As Integer
Dim strFileName As String
strFileName = "abc" & Format$(Now, "MMy") & ".log"
Text = Format$(Now, "HH:nn:ss") & " " & Text
Debug.Print Text
f = FreeFile
Open App.Path & "\" & strFileName For Append As #f
Print #f, Text
Close #f
End Sub
As a start, try putting calls in at the top of each sub and function. That way you'll narrow it to down to a particular procedure.
e.g.
Sub MyProc(Par1 as string)
Dim....
Writelog "Procedure: MyProc. Parameter Par1=" & Par1
...
End Sub
Main Topics
Browse All Topics





by: carl_tawnPosted on 2004-11-12 at 02:26:22ID: 12564041
Its quite possibly a Server 2003 related issue. There are lots of changes/new features in 2003 that can effect the way some things work.
Error number 9 is "Subscript out of range", so you need to start by looking at anywhere in your app that you use arrays (specifically looping through arrays)
Hope this helps.