Macro Warning Message

  • Thread starter Thread starter brian.baker13
  • Start date Start date
B

brian.baker13

Hi

I have a weekly sheet where I have inserted a macro button to remove
data from a previous week when starting a new one.

I want to put a warning message on screen first before the Macro is
executed. How do I do this?

Thanks

Brian
 
You could put the warning in the caption...

or you could just get a confirmation after they hit the button to start the
macro:

Dim Resp as long
'...
Resp = msgbox(Prompt:="You sure you want to do this?", buttons:=vbyesno)
if resp = vbno then
exit sub 'get out
end if
 
You could put the warning in the caption...

or you could just get a confirmation after they hit the button to start the
macro:

Dim Resp as long
'...
Resp = msgbox(Prompt:="You sure you want to do this?", buttons:=vbyesno)
if resp = vbno then
exit sub 'get out
end if

Sorted,

Thanks
 
Back
Top