Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I write a request to 'Save As' Macro CRAIG K[_2_] Excel Discussion (Misc queries) 5 March 10th 08 01:31 PM
no need save request box when excel is closing. Narendra Boga[_2_] Excel Discussion (Misc queries) 1 May 31st 07 06:58 PM
Hiding, or automatically answering, a confirmation msgbox Brian Beck Excel Discussion (Misc queries) 1 July 28th 06 04:11 PM
Answering a question in a cell Salesmaster Excel Worksheet Functions 2 July 16th 05 10:33 PM
Answering InpBox prompt lashio Excel Discussion (Misc queries) 4 June 24th 05 02:25 AM


All times are GMT +1. The time now is 10:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"