Message Boxes in Macros

G

GLS

Can someone tell me how I can incorporate a yes/no
response, to confirm an action (such as appending to a
table) in to a macro? I know you can stop them using
the 'Tools' 'Options' function but I'd rather build them
into the macro.

many thanks
GLS
 
A

Allen Browne

Use MsgBox() in the Condition column of your macro.

If you do not see a Condition column, use the View menu.

Example of what to use in the Condition column:
MsgBox("Proceed?", 4) = 7
and then in the Action column:
StopMacro
 
G

GLS

Thanks Allen. That's great.

GLS
-----Original Message-----
Use MsgBox() in the Condition column of your macro.

If you do not see a Condition column, use the View menu.

Example of what to use in the Condition column:
MsgBox("Proceed?", 4) = 7
and then in the Action column:
StopMacro

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




.
 
Top