View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob Bovey Rob Bovey is offline
external usenet poster
 
Posts: 811
Default checking if file is saved

"John" wrote in message
...
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 *


"John" wrote in message
...
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