supressing the message box

A

Anu

I have an excel macro which has some msgboxs with relevant messages
according to some business rules. I want to display these conditionaly
only when the function is invoked by clicking on a button. I dont want
these msgs to appear when the macro is run from a .vbs file. Is there
any way to accomplish this?
Pls let me know - ill be greatly benifited by it.
Thanks!
- Anu
 
B

BrianB

Is there a way of setting a variable to handle this? (Perhaps in
worksheet cell) eg:-

'--------------------------------------------------------------
Dim ShowMessage As Boolean
ShowMessage = True
If ShowMessage = True Then Msgbox( ..........................
'-------------------------------------------------------------
 
Top