Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Wayne
 
Posts: n/a
Default .ONACTION macro call fails

I created a custom toolbar first without code and
attached macros to the buttons, and they worked fine.
however, I had problems sharing the workbook with others;
I followed some code posted here to create a toolbar in
code, I used the .onaction property to assign the buttons
to the same macros but they don't work - it says macro
doesn't exist!!

I noticed this difference - when it fails it says the
macro "filename.xls!macroname" not found. But when I use
the toolbar customize fature to assign the macro it's in
the form "Thisworkbook!macroname". Looking for help!!

Wayne
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

You may find it much easier to build the toolbar on the fly when the workbook
opens and destroy the toolbar when the workbook closes.

John Walkenbach's menumaker adds menu items on the fly. It's really simple to
use. You can find it:
http://j-walk.com/ss/excel/tips/tip53.htm

If you want a toolbar, here's how I do it:
http://groups.google.co.uk/groups?th...5B41%40msn.com

Wayne wrote:

I created a custom toolbar first without code and
attached macros to the buttons, and they worked fine.
however, I had problems sharing the workbook with others;
I followed some code posted here to create a toolbar in
code, I used the .onaction property to assign the buttons
to the same macros but they don't work - it says macro
doesn't exist!!

I noticed this difference - when it fails it says the
macro "filename.xls!macroname" not found. But when I use
the toolbar customize fature to assign the macro it's in
the form "Thisworkbook!macroname". Looking for help!!

Wayne


--

Dave Peterson
  #3   Report Post  
David McRitchie
 
Posts: n/a
Default

One of the advantages of John's addin is the ability to arrange
your menus within submenus. So I think a better example for
doing it yourself should show that as well. I used to use John's
add-in until I got a better idea of what I wanted in my menus then
just created the menus manually and turned off the addin and the
overhead.

I do have a page to document what is in my toolbar menus,
and shows an example of what I have in mine.
I never did finish with the opposite, which would be to create the menus
which would have been useful for sharing menus.
Barhopper -- fixup for Restored Toolbars, and -- Listing of Menu Items
http://www.mvps.org/dmcritchie/excel/barhopper.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Dave Peterson" wrote in message ...
You may find it much easier to build the toolbar on the fly when the workbook
opens and destroy the toolbar when the workbook closes.

John Walkenbach's menumaker adds menu items on the fly. It's really simple to
use. You can find it:
http://j-walk.com/ss/excel/tips/tip53.htm

If you want a toolbar, here's how I do it:
http://groups.google.co.uk/groups?th...5B41%40msn.com

Wayne wrote:

I created a custom toolbar first without code and
attached macros to the buttons, and they worked fine.
however, I had problems sharing the workbook with others;
I followed some code posted here to create a toolbar in
code, I used the .onaction property to assign the buttons
to the same macros but they don't work - it says macro
doesn't exist!!

I noticed this difference - when it fails it says the
macro "filename.xls!macroname" not found. But when I use
the toolbar customize fature to assign the macro it's in
the form "Thisworkbook!macroname". Looking for help!!

Wayne


--

Dave Peterson



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
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
automatic macro update boconnell Excel Worksheet Functions 4 February 9th 05 07:10 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


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

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

About Us

"It's about Microsoft Excel"