View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
JSnow JSnow is offline
external usenet poster
 
Posts: 54
Default Confirm a choice before Macro

I have a macro attached to a button that will clear all data on a page. I'd
like there to be a confirmation (that's how I know it from javascript) to
preceed the macro. Here's the code thus far:

Sub clearAll()
Range("D3,...M48").ClearContents
End Sub

Is there something I can throw in the macro, before the Range line that will
ask, "Are you sure you want to delete all data?" If yes then fire macro, if
no then end.

Thanks, JSnow