View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Anony Anony is offline
external usenet poster
 
Posts: 35
Default ActiveX Control Return Keypress MsgBox Loop

Just two ideas:
1) Deactivate the button after you've clicked it and activate again it after
you've closed the Msgbox.
2) Declare a global boolean variable, say BtnClicked. Start by setting
BtnClicked as False. In your Button1_Click procedure, set BtnClicked to
True. Based on that, conditionally disable parts of the procedure as needed.
And with the message box, if the user clicks OK, reset the boolean variable
back to False.

Hope that helps,
Anony