Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Toolbar macro re-named

I have created a toolbar, and assigned macros to the various buttons.
However, excel has added the filename to the macro assignment.
For example, I have a macro called "StartNewProject".
When I assign this macro name to a button on the toolbar, close it, then
look at the button again, it has this macro assigned:
"<WorkbookName!StartnewProject".

Problem is, when I start with a new workbook, it is trying to open the macro
in another excel file.

How can I keep Excel from preceeding the macro name with the current
workbook file name?

Thanks in advance!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Toolbar macro re-named

You may find your life becomes much easier by using code to do this work.

You can 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)

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
or
http://www.rondebruin.nl/ribbon.htm

Dan wrote:

I have created a toolbar, and assigned macros to the various buttons.
However, excel has added the filename to the macro assignment.
For example, I have a macro called "StartNewProject".
When I assign this macro name to a button on the toolbar, close it, then
look at the button again, it has this macro assigned:
"<WorkbookName!StartnewProject".

Problem is, when I start with a new workbook, it is trying to open the macro
in another excel file.

How can I keep Excel from preceeding the macro name with the current
workbook file name?

Thanks in advance!


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Toolbar macro re-named

Place your macros into a new workbook and save it as an add-in.

Load that through ToolsAdd-ins.


Gord Dibben MS Excel MVP

On Tue, 18 Dec 2007 15:17:01 -0800, Dan wrote:

I have created a toolbar, and assigned macros to the various buttons.
However, excel has added the filename to the macro assignment.
For example, I have a macro called "StartNewProject".
When I assign this macro name to a button on the toolbar, close it, then
look at the button again, it has this macro assigned:
"<WorkbookName!StartnewProject".

Problem is, when I start with a new workbook, it is trying to open the macro
in another excel file.

How can I keep Excel from preceeding the macro name with the current
workbook file name?

Thanks in advance!


  #4   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Toolbar macro re-named

Gord -
You'll have to talk slower :-)
I opened a new worksheet, saved it as an addin.
If I select the addin using ToolsAddins, what next?
If I use my tool bar (under ViewToolbars) it still seems to want to find
the macro somewhere else.
Thanks!

"Gord Dibben" wrote:

Place your macros into a new workbook and save it as an add-in.

Load that through ToolsAdd-ins.


Gord Dibben MS Excel MVP

On Tue, 18 Dec 2007 15:17:01 -0800, Dan wrote:

I have created a toolbar, and assigned macros to the various buttons.
However, excel has added the filename to the macro assignment.
For example, I have a macro called "StartNewProject".
When I assign this macro name to a button on the toolbar, close it, then
look at the button again, it has this macro assigned:
"<WorkbookName!StartnewProject".

Problem is, when I start with a new workbook, it is trying to open the macro
in another excel file.

How can I keep Excel from preceeding the macro name with the current
workbook file name?

Thanks in advance!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Toolbar macro re-named

That's normal behavior if you link a macro to the commandbar. It remembers
the link and opens the linked macro's file if it's not open, then runs the
macro.

I like to use the Tag and ActionControl to handle menu/commandbar calls. It
avoids that problem and is much easier to manage it using code. As far as I
know, there's no way to avoid the behavior you see unless you
programmatically set up the menu and avoid linking it to a specific
workbook.

--
Tim Zych
SF, CA

"Dan" wrote in message
...
I have created a toolbar, and assigned macros to the various buttons.
However, excel has added the filename to the macro assignment.
For example, I have a macro called "StartNewProject".
When I assign this macro name to a button on the toolbar, close it, then
look at the button again, it has this macro assigned:
"<WorkbookName!StartnewProject".

Problem is, when I start with a new workbook, it is trying to open the
macro
in another excel file.

How can I keep Excel from preceeding the macro name with the current
workbook file name?

Thanks in advance!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TOOLBAR FOR A MACRO FARAZ QURESHI Excel Discussion (Misc queries) 3 July 3rd 08 12:12 PM
macro in toolbar jatman Excel Discussion (Misc queries) 1 September 21st 06 08:25 AM
macro toolbar Ankur Excel Discussion (Misc queries) 3 August 5th 06 01:55 AM
Toolbar with macro coal_miner Excel Programming 1 June 13th 05 04:11 PM
Macro Help on Toolbar dok112 Excel Programming 3 June 15th 04 03:03 AM


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

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

About Us

"It's about Microsoft Excel"