changing "save as" on menu

G

Guest

I want to change the "Save As" on the menu form to go directly to a different
form. I do not want it to update the original.

I have already disabled other forms of "save" with the code below:

Private Sub workbook_open()

'With CommandBars("File")
With Me.Application.CommandBars("File")
..Controls(4).Enabled = False 'Save Button

End With
Me.Application.CommandBars("standard").Controls("Save").Enabled = False

End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
With Me.Application.CommandBars("File")
.Controls(4).Enabled = True
End With

Me.Application.CommandBars("Standard").Controls("Save").Enabled = True
Me.Application.Dialogs(xlDialogSaveAs).Show "C:\New_Expense_Report.xls"

End Sub

Any help would be appreciated!
Thanks in Advance,
Elena
 
R

Ron de Bruin

Try this

Sub test()
Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=748, Recursive:=True).OnAction = "yourmacro"
End Sub

Sub yourmacro()
MsgBox ""
End Sub

Use this to reset

Sub test2()
Application.CommandBars("Worksheet Menu Bar").FindControl _
(ID:=748, Recursive:=True).OnAction = ""
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top