toolbar

F

fernando

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
 
B

Bernie Deitrick

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
 
G

Guest

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..
 
B

Bernie Deitrick

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
 
Top