+ Reply to Thread
Results 1 to 5 of 5

Call Macro in current workbook via custom menu

  1. #1
    Registered User
    Join Date
    09-29-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    77

    Call Macro in current workbook via custom menu

    Hi,

    We have a spreadsheet that is used by many people across many locations. As this sheet has grown we have needed to free up some space. And so I have desgined a custom menu that all users will have installed in Excel that will run macros that relate to the spreadsheet.

    The macro's stored in the spreadsheet are quite lengthy, so I didn't want to copy the code into the custome menu. I wanted to call them from the menu like so:

    Please Login or Register  to view this content.
    However I'm getting an error to say that it cannot find the Macro, could somebody tell me what I'm doing wrong?

    Many Thanks

    Macro1

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Call Macro in current workbook via custom menu

    The error perhaps occurs because the file in which the code is parked is closed. If you do this every time you have to keep open that file. I suggest you park the code in personal.xls file . Your submenu should assign this macro in personal.xls file. This file always opens whenever any excel file is opened but remains hidden.

  3. #3
    Registered User
    Join Date
    09-29-2009
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    77

    Re: Call Macro in current workbook via custom menu

    Thanks Venkat1962,

    I think the problem with that is that everytime I make an update to the template, the code would need to be recopied into all of the users personal.xla file. The reason i want it to call stright from the template is so that if any changes are made the user will always have the latest version.

    I just can't get it to pull through though!!!

    Thanks again

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,997

    Re: Call Macro in current workbook via custom menu

    Where in the template are the macros located?
    Everyone who confuses correlation and causation ends up dead.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Call Macro in current workbook via custom menu

    Create an Excel addin & install it on the Server
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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