H
hon123456
Dear all,
I have put a command button which do the save function as follows:
Private Sub CommandButton1_Click()
ThisWorkbook.SaveAs Filename:="abc.xls"
End Sub
And I have disabled the save and save as menu with following code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,
Cancel As Boolean)
Cancel = True
End Sub
Now, the problem is although I can disable the save and save as
menu, the save button is disabled too. How can I disable save and save
as menu but still allow my save button(CommandButton1) to save?
Thanks
I have put a command button which do the save function as follows:
Private Sub CommandButton1_Click()
ThisWorkbook.SaveAs Filename:="abc.xls"
End Sub
And I have disabled the save and save as menu with following code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean,
Cancel As Boolean)
Cancel = True
End Sub
Now, the problem is although I can disable the save and save as
menu, the save button is disabled too. How can I disable save and save
as menu but still allow my save button(CommandButton1) to save?
Thanks