On Error Resume Next question
On Sep 21, 4:51 pm, "Trevor Shuttleworth"
wrote:
Alice
the piece of code shown is missing an End If inside the For Loops. Probably
won't help ;-)
You should surround the code that can generate the error with On Error
Statements
On Error Resume Next ' switch on error trapping
' code that can produce the error
On Error Goto 0 ' switch off error trapping
' test for error condition
As it stands, the first time you go through the loop you switch on error
trapping and it stays on
Regards
Trevor
wrote in message
ups.com...
Thanks, Trevor. I see that Bob Phillips example had the two error
traps as you stated, but I didn't know why. I often feel that VBA is
like a foreign language where I just don't know enough words. Things
almost make sense, and after a lot of labor, I can usually get close
to what I want, but the fine details still elude me!
Alice
|