ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Make custom buttons point to local macros always (https://www.excelbanter.com/excel-discussion-misc-queries/229933-make-custom-buttons-point-local-macros-always.html)

Fabian

Make custom buttons point to local macros always
 
I created a custom toolbar with custom buttons that run macros in my workbook.
I attached the toolbar with the workbook and saved the file.
If I copy that file to another file name or move the file to another
directory, the custom buttons still point to the original file and its macros.
How can I make the custom buttons refer always to the local macros (which I
may have modified/improved from the original ones)?
Thank you.

Fabian


Dave Peterson

Make custom buttons point to local macros always
 
Saved from a previous post:

Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

In xl2007, those toolbars and menu modifications will show up under the addins.

And if you use xl2007:

If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
or
http://www.rondebruin.nl/2007addin.htm

Fabian wrote:

I created a custom toolbar with custom buttons that run macros in my workbook.
I attached the toolbar with the workbook and saved the file.
If I copy that file to another file name or move the file to another
directory, the custom buttons still point to the original file and its macros.
How can I make the custom buttons refer always to the local macros (which I
may have modified/improved from the original ones)?
Thank you.

Fabian


--

Dave Peterson

Fabian

Make custom buttons point to local macros always
 
Thank you very much Dave! That do the job.
Fabian

"Dave Peterson" wrote:

Saved from a previous post:

Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

In xl2007, those toolbars and menu modifications will show up under the addins.

And if you use xl2007:

If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
or
http://www.rondebruin.nl/2007addin.htm

Fabian wrote:

I created a custom toolbar with custom buttons that run macros in my workbook.
I attached the toolbar with the workbook and saved the file.
If I copy that file to another file name or move the file to another
directory, the custom buttons still point to the original file and its macros.
How can I make the custom buttons refer always to the local macros (which I
may have modified/improved from the original ones)?
Thank you.

Fabian


--

Dave Peterson



All times are GMT +1. The time now is 10:24 PM.

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