Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically answering no to save request
I'm writing a program where I have one spreadsheet go
through a group of other spreadsheets, opening them one at a time, grabbing some data, and closing them. The problem is that when my program closes the files, it is interupted because Excel will ask me if I want to save changes to the file I just opened. Is there a way I can use VBA to 1. Automatically answer no to the "save" question 2. Or, prevent the "save" question in the first place I could just use VBA to go ahead and save the files, but that dramatically slows the program down. Thanks for your help! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically answering no to save request
Yes, set the WorkBook.Saved property = True before your use Workbook.Close.
Tom Lavedas =========== "James Hess" wrote: I'm writing a program where I have one spreadsheet go through a group of other spreadsheets, opening them one at a time, grabbing some data, and closing them. The problem is that when my program closes the files, it is interupted because Excel will ask me if I want to save changes to the file I just opened. Is there a way I can use VBA to 1. Automatically answer no to the "save" question 2. Or, prevent the "save" question in the first place I could just use VBA to go ahead and save the files, but that dramatically slows the program down. Thanks for your help! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatically answering no to save request
Excellent, thank you. It worked with slight exception
I used "ActiveWorkbook.Saved = True" vs 'Workbook.Saved = True" -----Original Message----- Yes, set the WorkBook.Saved property = True before your use Workbook.Close. Tom Lavedas =========== "James Hess" wrote: I'm writing a program where I have one spreadsheet go through a group of other spreadsheets, opening them one at a time, grabbing some data, and closing them. The problem is that when my program closes the files, it is interupted because Excel will ask me if I want to save changes to the file I just opened. Is there a way I can use VBA to 1. Automatically answer no to the "save" question 2. Or, prevent the "save" question in the first place I could just use VBA to go ahead and save the files, but that dramatically slows the program down. Thanks for your help! . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I write a request to 'Save As' Macro | Excel Discussion (Misc queries) | |||
no need save request box when excel is closing. | Excel Discussion (Misc queries) | |||
Hiding, or automatically answering, a confirmation msgbox | Excel Discussion (Misc queries) | |||
Answering a question in a cell | Excel Worksheet Functions | |||
Answering InpBox prompt | Excel Discussion (Misc queries) |