I have in Module1:
I am also using a tricky method to force users to enable macros.
Found here: http://www.vbaexpress.com/kb/getarticle.php?kb_id=379
When a user enables macros several sheets become visible which in way has changed the file. Once the user has enable macros my "User Agreement Disclaimer" opens. If someone chooses cancel, the workbook closes but because of the fact that sheets have become visible they are asked if they want to save changes. If at this point they choose cancel the workbook does not close and they now have access to it without agreeing to the disclaimer.
Is there a way using the first bit of code to close the workbook without saving? Thanks!
John
Code:
Sub Auto_Open()
If vbYes <> MsgBox("Message", vbYesNo + vbExclamation, "User Agreement Disclaimer") Then
ThisWorkbook.Close False
End If
End Sub
Found here: http://www.vbaexpress.com/kb/getarticle.php?kb_id=379
When a user enables macros several sheets become visible which in way has changed the file. Once the user has enable macros my "User Agreement Disclaimer" opens. If someone chooses cancel, the workbook closes but because of the fact that sheets have become visible they are asked if they want to save changes. If at this point they choose cancel the workbook does not close and they now have access to it without agreeing to the disclaimer.
Is there a way using the first bit of code to close the workbook without saving? Thanks!
John