Thread: stopping macro
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
mudraker[_218_] mudraker[_218_] is offline
external usenet poster
 
Posts: 1
Default stopping macro

I do use a stop button on a status form in some of my macros


When a user presses the stop button, code attached to the stop butto
sets a public boolan variable.

At strategic places through out my code i place code to check if th
variable is true or false taking action as required


To prevent the macro from hanging waiting for user input when th
status form is activated i use

Private Sub UserForm_Activate()
call mymacro
End Su

--
Message posted from http://www.ExcelForum.com