Save as .txt then close

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top