Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro dont continue after save as | Excel Programming | |||
macro dont continue after save as | Excel Programming | |||
dont confirm save with yes/no/cancell | Excel Programming | |||
Save file with different name and dont update the links when opened again | Excel Discussion (Misc queries) | |||
Auto-save worksheet on close? | Excel Discussion (Misc queries) |