+ Reply to Thread
Results 1 to 4 of 4

Add option to right click menu to run macro (2007)

  1. #1
    Registered User
    Join Date
    06-21-2011
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Add option to right click menu to run macro (2007)

    Hi Guys,

    The following code has been provided on a prior thread to add macro option to 2003 but I cant get it to function fully in 2007 as I get the following message when the 'run my code' option is selected from the right click menu;

    Cannot run macro "macro test 4.xlsm'!mymacroname'. The macro may not be available in this workbook or all macros may be disabled.

    Thank you for any assistance... Kabes
    Please Login or Register  to view this content.
    Last edited by kabes; 06-26-2011 at 07:34 PM. Reason: add tags

  2. #2
    Registered User
    Join Date
    06-21-2011
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Add option to right click menu to run macro (2007)

    Bump no response

  3. #3
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,881

    Re: Add option to right click menu to run macro (2007)

    Hi Kabes,

    Make sure your "mymacroname" macro resides in a Standard Module, not in one of the Worksheet or ThisWorkbook modules.

    Your code runs fine in my 2007 environment as long as it's in a Standard Module.

    Hope that helps!

  4. #4
    Registered User
    Join Date
    06-21-2011
    Location
    NSW, Australia
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Add option to right click menu to run macro (2007)

    Gday Paul,

    Problem solved...

    Your solution works a charm...

    Can't tell you how grateful I am for this guidance...

    Regards Kabes

+ 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