If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Custom Buttons linked to Macros
This is fustrating...
I have made a custom menu based upon macros that I have in a worksheet. This worksheet is a file which will be saved using a different names at any given time. When I use the custom menu based upon the macros in the first saved file it works. When I go back to the "template" file and do another save as, when I try using the custom menu, it trys looking for the macros in the previous saved file instead of looking at the macros in the just saved file. Can this be fixed to where it will what ever the file name is not try and cross link to another set of macros but use the one in the file? Any help would be great! Thanks in advance |
#2
|
|||
|
|||
Custom Buttons linked to Macros
Assign/unassign on open/close. Below is example for toolbar.
Sub Auto_open() Toolbars("LogForm").Visible = True Toolbars("LogForm").ToolbarButtons(1).OnAction = "PhoneLogger" Toolbars("LogForm").ToolbarButtons(2).OnAction = "LateLogger" End Sub Sub Auto_close() On Error Resume Next Toolbars("LogForm").ToolbarButtons(1).OnAction = "" Toolbars("LogForm").ToolbarButtons(2).OnAction = "" Toolbars("LogForm").Visible = False Toolbars("LogForm").Delete On Error GoTo 0 End Sub HTH, Greg "surveyorinva" wrote in message ... This is fustrating... I have made a custom menu based upon macros that I have in a worksheet. This worksheet is a file which will be saved using a different names at any given time. When I use the custom menu based upon the macros in the first saved file it works. When I go back to the "template" file and do another save as, when I try using the custom menu, it trys looking for the macros in the previous saved file instead of looking at the macros in the just saved file. Can this be fixed to where it will what ever the file name is not try and cross link to another set of macros but use the one in the file? Any help would be great! Thanks in advance |
Thread Tools | |
Display Modes | |
|
|