IDE - just a thought on Next and Out of Subscript
#5
Hi Dimster,

As KernelPanic has shown, the regular Subscript error shows the line number at fault but I added it to our little error handler code because there is the codeword _ErrorLine
Code: (Select All)
On Error GoTo ehandle
Dim a(1 To 15)
For i = 1 To 20
    a(i) = i ' error at i = 16
Next
End

ehandle:
Print "Index i is"; i
Print "Error line "; _ErrorLine
Print "Error: "; Err
End

Yeah also your error could occur way up the line of code and not effect anything until the rubber meets the road like a subscript error. IDE would have to be pretty darn smart to say, "Hey dude, that's a typo or the wrong variable on line xxx, you should fix it before you get a subscript out of range error on line yyy."

PS If it can distinguish you as a dude as opposed to dudette then... well I don't know what then ;-))
b = b + ...
Reply


Messages In This Thread
RE: IDE - just a thought on Next and Out of Subscript - by bplus - 05-14-2023, 05:40 PM



Users browsing this thread: 5 Guest(s)