A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Custom Buttons linked to Macros



 
 
Thread Tools Display Modes
  #1  
Old June 16th, 2004, 02:51 PM
surveyorinva
external usenet poster
 
Posts: n/a
Default 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  
Old June 16th, 2004, 06:37 PM
Greg Koppel
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:50 AM.


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