Thread: Save vs SaveAs
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default Save vs SaveAs

There is.

Put this in the "ThisWorkbook" module

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI Then
MsgBox ("You did a SAVEAS")
Else
MsgBox ("You did a SAVE")
End If

End Sub

I've not used it much so had to play a bit. I'm not sure how the CANCEL
works.
--
HTH,
Barb Reinhardt



"Sandy" wrote:

Is there a way to detect in VB if the user did a Save Vs a SaveAs command.

Thank you.