Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Close worksheet, dont save

i have a macro in file A that opens file B , copies some data from it, pastes
it to file A, then closes file B.

when it closes file B, i dont want it to save changes.

i can find the command that WILL Save it (ActiveWorkbook.Save), & am
currently using the command to not save it (ActiveWorkbook.Close), however it
always brings up the "Do you want to save changes?" tick box in the middle of
the macro.

how do i get round this? is there a command to say 'close, no changes'?

cheers


jb
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Close worksheet, dont save

Hi jb,

Application.DisplayAlerts = False
Workbooks("BOOK1.XLS").Close
Application.DisplayAlerts = True

Regards,

OssieMac

"JB2010" wrote:

i have a macro in file A that opens file B , copies some data from it, pastes
it to file A, then closes file B.

when it closes file B, i dont want it to save changes.

i can find the command that WILL Save it (ActiveWorkbook.Save), & am
currently using the command to not save it (ActiveWorkbook.Close), however it
always brings up the "Do you want to save changes?" tick box in the middle of
the macro.

how do i get round this? is there a command to say 'close, no changes'?

cheers


jb

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Close worksheet, dont save

cheers, OssieMac

works a treat!

jb

"OssieMac" wrote:

Hi jb,

Application.DisplayAlerts = False
Workbooks("BOOK1.XLS").Close
Application.DisplayAlerts = True

Regards,

OssieMac

"JB2010" wrote:

i have a macro in file A that opens file B , copies some data from it, pastes
it to file A, then closes file B.

when it closes file B, i dont want it to save changes.

i can find the command that WILL Save it (ActiveWorkbook.Save), & am
currently using the command to not save it (ActiveWorkbook.Close), however it
always brings up the "Do you want to save changes?" tick box in the middle of
the macro.

how do i get round this? is there a command to say 'close, no changes'?

cheers


jb

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Close worksheet, dont save

Another one:

Someworkbook.close savechanges:=false



JB2010 wrote:

i have a macro in file A that opens file B , copies some data from it, pastes
it to file A, then closes file B.

when it closes file B, i dont want it to save changes.

i can find the command that WILL Save it (ActiveWorkbook.Save), & am
currently using the command to not save it (ActiveWorkbook.Close), however it
always brings up the "Do you want to save changes?" tick box in the middle of
the macro.

how do i get round this? is there a command to say 'close, no changes'?

cheers

jb


--

Dave Peterson
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
macro dont continue after save as pswanie Excel Programming 1 August 7th 07 08:44 PM
macro dont continue after save as pswanie Excel Programming 3 August 7th 07 08:18 PM
dont confirm save with yes/no/cancell pswanie Excel Programming 2 June 18th 07 05:56 PM
Save file with different name and dont update the links when opened again [email protected] Excel Discussion (Misc queries) 0 January 25th 07 09:09 PM
Auto-save worksheet on close? [email protected] Excel Discussion (Misc queries) 1 January 2nd 06 02:12 PM


All times are GMT +1. The time now is 04:52 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"