Sheet Deactivate Loop

J

Jason Morin

I run a series of checks on a worksheet (called "Input") before the user can
click on another sheet called "Output". If Input check outs, I want to
activate the Output sheet and exit the sub. However, this seems to run the
deactivate event for Input again and the macro loops for a while. Any
suggestions? Thanks -Jason

Sub Worksheet_Deactivate()
....
If iCounter = 0 Then
Sheets("Output").Activate
Exit Sub
End If
....
 
R

Rick Rothstein

And don't forget to set it back to True at the end of your code...

Application.EnableEvents = True
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top