ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   toolbar (https://www.excelbanter.com/excel-programming/300020-toolbar.html)

fernando

toolbar
 
Hello,

I have macros linked to toolbar buttons. When users change
name for the file containing macro, the link breaks up. Is
there a way to make this "link" again automatically?,
without making an add-in and with code?

Thanx

Bernie Deitrick

toolbar
 
fernando,

There is no automatic way. You need to have VBA code in your workbook that
creates / deletes the toolbar buttons when the workbook is opened / closed.
Post back if you want to use code to do this.

HTH,
Bernie
MS Excel MVP

"fernando" wrote in message
...
Hello,

I have macros linked to toolbar buttons. When users change
name for the file containing macro, the link breaks up. Is
there a way to make this "link" again automatically?,
without making an add-in and with code?

Thanx




No Name

toolbar
 
I already have code to create toolbar (dont delete it when
workbook is closed), however I have to run it everytime
the filename is changed. Besides, users open the workbooks
by clicking on the toolbar button..



-----Mensaje original-----
fernando,

There is no automatic way. You need to have VBA code in

your workbook that
creates / deletes the toolbar buttons when the workbook

is opened / closed.
Post back if you want to use code to do this.

HTH,
Bernie
MS Excel MVP

"fernando" wrote in

message
...
Hello,

I have macros linked to toolbar buttons. When users

change
name for the file containing macro, the link breaks up.

Is
there a way to make this "link" again automatically?,
without making an add-in and with code?

Thanx



.


Bernie Deitrick

toolbar
 
fernando,

Try using the file's workbook close event to delete and re-create the
toolbar button, assigning the macro with a full path. If the file's name
has changed, then the macro assignment would also change.

HTH,
Bernie
MS Excel MVP

wrote in message
...
I already have code to create toolbar (dont delete it when
workbook is closed), however I have to run it everytime
the filename is changed. Besides, users open the workbooks
by clicking on the toolbar button..



-----Mensaje original-----
fernando,

There is no automatic way. You need to have VBA code in

your workbook that
creates / deletes the toolbar buttons when the workbook

is opened / closed.
Post back if you want to use code to do this.

HTH,
Bernie
MS Excel MVP

"fernando" wrote in

message
...
Hello,

I have macros linked to toolbar buttons. When users

change
name for the file containing macro, the link breaks up.

Is
there a way to make this "link" again automatically?,
without making an add-in and with code?

Thanx



.





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

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