View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
JMay JMay is offline
external usenet poster
 
Posts: 468
Default Confused here Prevent Saving File - but allow ONLY File SAVEAS Met

I have the two event codes below. I do not want the current file to be saved
with the opening Filename. What am I missing in order to after the user gets
the message below he is able to then do a File SAVEAS and (must) enter a new
filename?

Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox "This is a Template File. Do a File, SaveAs and provide a New
FileName with Date"
Cancel = True
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "This is a Template File. Do a File, SaveAs and provide a New
FileName with Date"
Cancel = True
End Sub