Disable "Save changes" prompt for text file in Excel

smithford56

New Member
Joined
Jan 24, 2008
Messages
2
Hi -

I'm using Excel 2004 on a Mac. Whenever you save a text file (tab delimited) in Excel it always prompts to ask "Do you want to save changes you made to document.txt?" Even if you have just saved the file, when you go to close the file, it will still prompt to ask if you want to save.

Basically I have a macro that copies some data, opens a new workbook, pastes the data to the new worksheet, saves it as text, then closes then repeats this over and over. But it always prompts to save changes and I just have to click Don't Save over and over.

Here is the end of the macro where it saves and closes the file.

ActiveWorkbook.SaveAs Filename:= _
"Macintosh HD:Users:User1:Desktop:Samples:"Sample.txt", FileFormat:= _xlText, CreateBackup:=False
ActiveWindow.Close


If anyone knows how to disable the prompt that automatically asks if I want to save changes for text files, I would be really grateful. Obviously I would still want it to ask, if there are changes since my last save, but if not I would like it to just close even for text files.

Anyone have any ideas? Thanks!!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Welcome to the Board!

Not sure if it'll work on a MAC, but try "Activeworkbook.Close True".

If that doesn't do it try adding "Application.DisplayAlerts = False" before the close line and set it back to true afterwards.

Hope that helps,

Smitty
 
Upvote 0

Forum statistics

Threads
1,215,465
Messages
6,124,979
Members
449,200
Latest member
Jamil ahmed

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top