Hi guys,
I need my spreadsheet to require that the user save it by clicking a macro button, and not the Save or SaveAs options in the file menu. I have found out how to disable saving entirely:
But this of course prevents my macro button from saving too!
Is there any way to allow VBA code to save the spreadsheet while simultaneously preventing the user from saving through the menu?
Thanks!
I need my spreadsheet to require that the user save it by clicking a macro button, and not the Save or SaveAs options in the file menu. I have found out how to disable saving entirely:
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = True
If SaveAsUI Then SaveAsUI = False
End Sub
But this of course prevents my macro button from saving too!
Is there any way to allow VBA code to save the spreadsheet while simultaneously preventing the user from saving through the menu?
Thanks!