I am looping through a collection and try to trap the error that occurs when the member of the collection does not exist. I can't get my error handling to deal with the situation, it just ignores my direction to go to a line number and crashes.
On Error GoTo 32
If Not IsError(Lwks(str).ProgD) Then
If str does not exist in the collection Lwks, then I expect and error (5) and would like to go to line 32. If it does exist, it works fine but rather than go to line 32 when it errors, it just crashes.
What am I missing?
Thanks
Ken
On Error GoTo 32
If Not IsError(Lwks(str).ProgD) Then
If str does not exist in the collection Lwks, then I expect and error (5) and would like to go to line 32. If it does exist, it works fine but rather than go to line 32 when it errors, it just crashes.
What am I missing?
Thanks
Ken