Track if any changes made after file opened

S

sermest

Hello,

I have a template file which has vb codes, user forms. I want to
activate one of the user forms if no change has made after excel file
opened, or deactivate if any changes made after excel file opened. Is
there any way I can track that?

Thanks,
sermest
 
O

OssieMac

If Not ActiveWorkbook.Saved Then
MsgBox "This workbook contains unsaved changes."
Else
MsgBox "No Unsaved Changes"

End If

Can use ThisWorkbook.Saved. Also the property can be set to True so that you
can exit without saving or getting an Alert message.
 

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

Top