Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default changing "save as" on menu

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("S ave").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("S ave").Enabled = True
Me.Application.Dialogs(xlDialogSaveAs).Show "C:\New_Expense_Report.xls"

End Sub

Any help would be appreciated!
Thanks in Advance,
Elena

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default changing "save as" on menu

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

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Elena" wrote in message ...
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("S ave").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("S ave").Enabled = True
Me.Application.Dialogs(xlDialogSaveAs).Show "C:\New_Expense_Report.xls"

End Sub

Any help would be appreciated!
Thanks in Advance,
Elena



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
Lost "File Menu" - now it's "Edit / View / Insert.." but no "F daves Excel Discussion (Misc queries) 3 April 24th 07 04:52 AM
"Save" and "Save As" options greyed out - "Save as Webpage" option Bill Excel Discussion (Misc queries) 0 January 16th 07 04:47 PM
Changing "returned" values from "0" to "blank" LATATC Excel Worksheet Functions 2 October 20th 05 04:41 PM
save and restore "Workbook Menu Bar" & "Cell" menus Jeff Higgins Excel Programming 2 February 14th 05 01:33 AM


All times are GMT +1. The time now is 11:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"