View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Flanagan Bob Flanagan is offline
external usenet poster
 
Posts: 340
Default Macro confirm to run

use a statement like:

If msgbox("delete data?",vbokcancel) = vbcancel then exit sub

If Ok is selected, then the macro continues to run.

Bob Flanagan
Macro Systems
144 Dewberry Drive
Hockessin, Delaware, U.S. 19707

Phone: 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"Neil R" wrote in message
...
I have created a simpel macro that deletes data in mutiple ranges,
I have assigned this macor to a button on the sheet.
I would like to have a confirmation window or checkbox pop up befor tha
delete code runs so the user has a way to stop it if was pressed by
mistake.
Is this possabel

Thanks for any Help