View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default GoTo won't work - why?

It will not stop at the label, but should execute the first line after the
label.

TryAgain:

MsgBox "This line executes
'More code
Application.GoTo TryAgain:


"Jim" wrote:

In a sub

TryAgain:

(some code)

Application.GoTo TryAgain

(more code)

End Sub

I never use GoTo statements except for error handling so I wonder if they
will backup as well as skipping lines? I really need this thing to back up.
When running, the Application.Goto TryAgain line is skipped as if it isn't
there. Not even an error. What's up?

Thanks for any help.