Save as .txt then close

R

Ryan

I am trying to automatically close excel after I do a save as event macro. The problem that I am encountering has to do with the fact that the save as feature is saving the worksheet as a .txt file. I can't seem to get the workbooksObject.close to work. Any suggestions

Ryan
 
A

AA2e72E

How does it not work? Does it appear to do nothing or does it prompt you to do something else

I suspect it might be the latter. Try setting the saved property to true before closing

ActiveWorkbook.Saved = Tru
ActiveWorkbook.Clos

set WorkbookObject = Nothing ' this is your object
 
Top