View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Msgbox Close with vba

Put an If...Then statement in to only fire the message box when it is needed.

If this condition is met Then
'activate the message box
Else
'ignore this and go on with the code
End If

"art" wrote:

Hello:

I have a code that triggers a msgbox to open and ask the user yes or no.
However, there is certain times that the msgbox triggers but I don't need it.
How can I put in the code to close the msgbox. Please understand the the code
that triggers the msgbox is not in the same sub as the code that I want to
cancel the msgbox.

Thanks.

Art