ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Manually assigning Macros to Buttons w/o File Dependence (https://www.excelbanter.com/excel-programming/310316-manually-assigning-macros-buttons-w-o-file-dependence.html)

TMAC

Manually assigning Macros to Buttons w/o File Dependence
 
Same problem here. Been trying to figure this one out.
One suggestion is to build the toolbars dynamically when
the sheet opens by using the commandbars vbe function.

Im stumped as well. If i can find where the code is
stored for the custom toolbars I have made, I should be
able to cut and paste..

tim
-----Original Message-----
OK, another dumb one...I would like to assign a macro to

a toolbar button in
a way which points to a macro of that name in the current

workbook, without
having to write code to do this.

Right now, when I assign the macro manually, then save

the spreadsheet under
a different name, Excel adds the originating

spreadsheet's name to the macro
assignment in the toolbar button.

I'm looking for something like: Thisworkbook!macroname or

Me.macroname.
.


John Loo

Manually assigning Macros to Buttons w/o File Dependence
 
Right now, I think I will be putting the code into an add-in sheet. That way,
at least the static sheet name will be valid if the add-in is installed.

"TMAC" wrote:

Same problem here. Been trying to figure this one out.
One suggestion is to build the toolbars dynamically when
the sheet opens by using the commandbars vbe function.

Im stumped as well. If i can find where the code is
stored for the custom toolbars I have made, I should be
able to cut and paste..

tim
-----Original Message-----
OK, another dumb one...I would like to assign a macro to

a toolbar button in
a way which points to a macro of that name in the current

workbook, without
having to write code to do this.

Right now, when I assign the macro manually, then save

the spreadsheet under
a different name, Excel adds the originating

spreadsheet's name to the macro
assignment in the toolbar button.

I'm looking for something like: Thisworkbook!macroname or

Me.macroname.
.




All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com