ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Close file without saving (https://www.excelbanter.com/excel-programming/314402-close-file-without-saving.html)

Roadie[_4_]

Close file without saving
 

Tom Ogilvy Wrote:
You say excel then doesn't close the file.

From your description, it sounds like you are getting the prompt for
file
different from the one you intend to close. You need to look mor
closely
at how you are referencing the file.

I have never seen a prompt from

workbooks(sourcename).Close SaveChanges:=False
There wouldn't be much point in having the SaveChanges Argument sinc
it is
provided to answer that question.

--
Regards,
Tom Ogilvy

Hi Tom,

Thanks for your reply. Actually the message is 'Do you want to save th
changes you made to 'data280.xls'?', which is the file I want to close


In the past, just 'Workbooks(sourcefilename).Close' in combination wit
'Application.DisplayAlerts = False' worked fine. When it didn't work i
the new macro, I changed it in 'Workbooks(sourcefilename).Clos
SaveChanges:=False'.
But whatever I try, it just doesn't work anymore.

Regards,

Anne

--
Roadi
-----------------------------------------------------------------------
Roadie's Profile: http://www.excelforum.com/member.php...nfo&userid=593
View this thread: http://www.excelforum.com/showthread.php?threadid=27153



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com