checking if file is saved

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

Guest

I would like to enter code to check if the file was saved before closing
I am using a form with a close button.

'check here if file has been saved first
??

Worksheets("StartupSheet").Activate
Application.Quit
 
John said:
I would like to enter code to check if the file was saved before closing
I am using a form with a close button.

Hi John,

If Not ActiveWorkbook.Saved Then
''' The workbook is not saved. Take action here.
End If

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *
 

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