View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default VBA command to say "yes"/"no" to popup window

Hi Manuel

If you use this for example the workbook will be closed without saving

ThisWorkbook.Close SaveChanges:=False


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Manuel" wrote in message ...
Hi,

Does anyone know what VBA command I could insert into my
Macro that would automatically select "yes" or "no" to an
Excel pop-up window?

So for example, I have a Macro which opens and closed
workbooks and moves data from one workbook to another. In
the process, I'll get an Excel window, which asks "do you
want to save" (or something along those lines). I then
click "No" and the Macro continues along its merry way. I
was wondering if I could insert VBA code at that junction
which would automatically select "No" to that prompt.

Please advise.

Thanks,

Manuel