View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Auto answer - "Do you wish to save changes"

But why don't you use

ActiveSheet.PrintOut

Instead of copy it first to a new workbook

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


"Peter" wrote in message ...
Hi,

I have a script that copies a worksheet, creates a new workbook
containing the copied sheet which is then printed. After printing the
new workbook is closed

The script is:

ActiveSheet.Copy

'Next line prints out the new worksheet

ActiveWorkbook.PrintOut

'Next line closes the workbook containing the copied worksheet

ActiveWorkbook.Close

Obviously when I close the new (and temporary) workbook I'm prompted
with the question "Do I wish to save the changes to book 2?"

Is it possible to get the script to effectively answer that question
for me - so the question doesn't appear?


--
Cheers

Peter

Remove the INVALID to reply