+ Reply to Thread
Results 1 to 10 of 10

A macro to right click a cell and select a item from the right click menu?

  1. #1
    Registered User
    Join Date
    04-13-2009
    Location
    Mosjøen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    12

    A macro to right click a cell and select a item from the right click menu?

    Hi all!

    I wonder if it is possible to make a macro that right clicks a cell and then chooses a option from the list?

    Thanks!

    -A-

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: A macro to right click a cell and select a item from the right click menu?

    Why don't you use a validation list?
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: A macro to right click a cell and select a item from the right click menu?

    Hmmmm! You didn't like that!!

    This one?
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-13-2009
    Location
    Mosjøen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: A macro to right click a cell and select a item from the right click menu?

    Quote Originally Posted by Fotis1991 View Post
    Hmmmm! You didn't like that!!

    This one?
    Please Login or Register  to view this content.
    I didn't understand this one. I am a noob to VBA
    Maybe I need to clarify my problem:
    Can a macro be used to perform this action: Select a cell, and right click and choose "Recalculate function"?
    macro.jpg

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: A macro to right click a cell and select a item from the right click menu?

    Now makes no sense to me. Why do you need such a macro?

    It's must be something that i don't understand for sure...

  6. #6
    Registered User
    Join Date
    04-13-2009
    Location
    Mosjøen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: A macro to right click a cell and select a item from the right click menu?

    Quote Originally Posted by Fotis1991 View Post
    Now makes no sense to me. Why do you need such a macro?

    It's must be something that i don't understand for sure...
    I use PI datalink to collect and show data. In order to collect new data since last time the document was opened I need to manually right click and select "Recalculate...".
    I have a document with about 70 cells of this kind. And this take a lot of time
    Hope this was understandable.

  7. #7
    Registered User
    Join Date
    04-13-2009
    Location
    Mosjøen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: A macro to right click a cell and select a item from the right click menu?

    No ideas? Still got this issue unresolved.

  8. #8
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: A macro to right click a cell and select a item from the right click menu?

    You may try:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  9. #9
    Registered User
    Join Date
    04-13-2009
    Location
    Mosjøen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: A macro to right click a cell and select a item from the right click menu?

    Quote Originally Posted by Izandol View Post
    You may try:
    Please Login or Register  to view this content.
    I get the error message: "Invalid use of property"
    Maybe I am typing it wrong? I am a noob in VBA

  10. #10
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: A macro to right click a cell and select a item from the right click menu?

    I can not test without the add-in but the syntax is correct for a control on Cell menu. It is possible that control is added dynamically and does not exist when code runs.

  11. #11
    Registered User
    Join Date
    04-13-2009
    Location
    Mosjøen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: A macro to right click a cell and select a item from the right click menu?

    Quote Originally Posted by Izandol View Post
    I can not test without the add-in but the syntax is correct for a control on Cell menu. It is possible that control is added dynamically and does not exist when code runs.
    I works It was my mistake, I forgot to choose the actual cell and then run the macro.
    But is there any way I can use this code to choose a cell, perform this code, choose the next cell and perform this code and so on?

  12. #12
    Registered User
    Join Date
    04-13-2009
    Location
    Mosjøen, Norway
    MS-Off Ver
    Excel 2007
    Posts
    12

    Re: A macro to right click a cell and select a item from the right click menu?

    Quote Originally Posted by Izandol View Post
    I can not test without the add-in but the syntax is correct for a control on Cell menu. It is possible that control is added dynamically and does not exist when code runs.
    I works It was my mistake, I forgot to choose the actual cell and then run the macro.
    But is there any way I can use this code to choose a cell, perform this code, choose the next cell and perform this code and so on?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Is it possible add new menu item to right click in pivottable
    By vvickyy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-31-2014, 06:32 AM
  2. [SOLVED] Add menu item to right click
    By Dev in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2006, 01:40 PM
  3. [SOLVED] Adding a item to the right click menu?
    By silkworm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-24-2005, 01:28 AM
  4. [SOLVED] How to delete item on right click menu?
    By Bobo in forum Excel General
    Replies: 1
    Last Post: 08-28-2005, 12:05 PM
  5. [SOLVED] Add item to sheet right-click menu?
    By RB Smissaert in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-13-2005, 01:06 PM

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