View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
wanderlust wanderlust is offline
external usenet poster
 
Posts: 3
Default AutoRun Macro with a delay to give user the choice to cancel the macro

Hi,
I am trying to write a macro that will execute when the workbook
is open. What I intend to do is to run this macro off of a batch file
that will open the file, run the macro and close the workbook.

Ideally, when the batch file kicks off the macro, I would like to
have a message pop up that says "Do you want to run the macro?" with
"yes" and "no" as the options. If there is no response within 10
seconds, go ahead and run the macro. This way, if some user opens the
file, but doesn't want to run the macro, the user can click on "no"
within 10 seconds and cancel the macro execution.

Thanks,
Ravi