The following code is a sub that I have written. This procedure is called repeatedly. However, rsSelected is sometimes a valid array and sometimes it is not. What I want to happen is when I receive the 'subscript out of range' error then you just exit the sub without running the DrawSpatialRecordset function. What is wrong with the way I have my error handler set up? Thanks.
Public Sub DrawSelectedFeatures(ByVal hDC As StdOle.OLE_HANDLE)
On Error GoTo booboohandler
Dim i As Integer
For i = 1 To UBound(rsSelected)
DrawSpatialRecordset rsSelected(i), moPurple, moSolidFill
Next
booboohandler:
Exit Sub
End Sub
Public Sub DrawSelectedFeatures(ByVal hDC As StdOle.OLE_HANDLE)
On Error GoTo booboohandler
Dim i As Integer
For i = 1 To UBound(rsSelected)
DrawSpatialRecordset rsSelected(i), moPurple, moSolidFill
Next
booboohandler:
Exit Sub
End Sub