+ Reply to Thread
Results 1 to 3 of 3

.ONACTION macro call fails

  1. #1
    Wayne
    Guest

    .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. #2
    Dave Peterson
    Guest

    Re: .ONACTION macro call fails

    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. #3
    David McRitchie
    Guest

    Re: .ONACTION macro call fails

    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" <[email protected]> wrote in message news:[email protected]...
    > 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1