+ Reply to Thread
Results 1 to 2 of 2

Persistent custom right-click shortcut menu item

  1. #1
    Registered User
    Join Date
    02-27-2008
    Location
    Irving, Texas
    MS-Off Ver
    MS Office 2016
    Posts
    96

    Persistent custom right-click shortcut menu item

    Everyone,

    Below is some code that I've written to add a new right-click shortcut menu item that opens a file based on the data in the active cell. My goal is to have this right click functionality available on any sheet in any workbook without needing the user to add the code to each workbook. Here's the code from personal.xls that adds the right click functionality (emphasis added):

    Please Login or Register  to view this content.
    The problem is that the rightclick code above isn't really what's being run and I'm really confused by that. I had changed the "temporary:=True" above to false, and saved everything as an addin (.xla file) to see if it would easily port to other machines. My memory of the exact sequence of events is hazy, so I can't give an accurate timeline of what I did when. I think that when I mucked around with the temporary true/false setting, it got applied to some other persistent location that I can't find. My symptoms are as follows: any changes to the rightclick code above do not affect the project (I can change caption:= to "Change change change" and the rightclick menu item still has the caption "Open in AutoVue"), removing the personal.xls file from the XLSTART folder does not remove the rightclick menu item, and removing the .xla file from the ...Microsoft\Addins folder doesn't get rid of it either.

    I'm happy that the code works with any new workbook I open in excel, but I'm unhappy that I've created some sort of immovable object that can't be changed or removed. I need to understand how the menu item got there and what I can do to remove/modify it so that I can figure out the correct method to give the code to other users on other machines. If anyone can offer some suggestions, advice, or other places to look for help, I'd be eternally grateful!

    Thanks,
    Adam Hartman
    Last edited by ahartman; 02-02-2009 at 01:34 PM. Reason: Solved myself :)
    -Adam Hartman
    Mechanical Engineer

  2. #2
    Registered User
    Join Date
    02-27-2008
    Location
    Irving, Texas
    MS-Off Ver
    MS Office 2016
    Posts
    96

    Re: Persistent custom right-click shortcut menu item

    Sorry to answer my own question, but I think I found the problem. My code was in 2 places in personal.xls. It was in ThisWorkbook and Sheet 1. I was only changing the one in ThisWorkbook, which, obviously, doesn't do much of anything when the code is meant for a worksheet. Geting rid of the ThisWorkbook copy and modifying the Sheet 1 version gave me back the functionality I needed.

+ 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