+ Reply to Thread
Results 1 to 9 of 9

double click with macro

  1. #1
    Registered User
    Join Date
    05-20-2013
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    52

    double click with macro

    Hi Experts

    There is a =EVMNU() function, to run it I have double click on it.

    Now my requirement is that I want to run this function via VBA macro , where I can't since there is no function which will double click on the cell and also there is no sendkeys for LEFT Mouse CLICK ..

    How can i achieve this double click with macro or is there any setting in excel which will trigger above function with single click.

    My friend suggested to use function Worksheet_BeforeDoubleClick , not sure how to use it.

    Thanks for reading my post!!

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: double click with macro

    I've never heard of the EVMNU() function.
    Where is it and what does it do?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    05-20-2013
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    52

    Re: double click with macro

    Hi Ron

    This is SAP BPC specific function , it will attach to excel when you install the SAP BPC client on your machine.

    I am looking to trigger this =EVMNU() via macro..and run it require double left click..

    Thanks for your response!!

  4. #4
    Forum Contributor
    Join Date
    05-05-2009
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010 and 365
    Posts
    113

    Re: double click with macro

    two things to try.

    1. Use the same exact syntax you would enter in the worksheet cell, EXCEPT omit the equal sign.

    Please Login or Register  to view this content.

    2. Same except precede with appliction.worksheetfunction.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-20-2013
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    52

    Re: double click with macro

    Hi Cyclops

    I have to use "=" with syntax -> =EVMNU(param1,param2,..)

    The 2nd method will not work since it is inbuilt function.

    Thanks for your response..

    It will be great if you can let me know how to double click (LEFT) from macro on excel cell..

    OR

    How to trigger that function with single click..is there any

  6. #6
    Forum Contributor
    Join Date
    05-05-2009
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010 and 365
    Posts
    113

    Re: double click with macro

    V2k2apj,


    If you put the code in the worksheet, you can call the BeforeDoubleClick event directly.


    Please Login or Register  to view this content.

    To call from separate module use


    Please Login or Register  to view this content.

    You'll obviously need to change some things around but that should show how to run the code associated with a double click.
    Last edited by Cyclops; 05-22-2013 at 05:27 PM.

  7. #7
    Registered User
    Join Date
    05-20-2013
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    52

    Re: double click with macro

    Hi Cyclops

    Appreciate your response, but this will not help in my scenario , let me give you scenario

    Step 1) User open excel and hit the button having macro.
    Step 2)This macro will select(click) the other cell where this function(=EVMNU) is written.

    But Select (single click) (Range("I37").Select) does not run that function , to actually run that function, it needed to be double click(double select)..

  8. #8
    Forum Contributor
    Join Date
    05-05-2009
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010 and 365
    Posts
    113

    Re: double click with macro

    Book1.xlsI think it may help. You can't just paste the code into your existing workbook. It should work in a new workbook. It's purpose was to show you how to trigger the double click even of a cell.


    What you need to do is add a public sub inside the worksheet code. The button that the user clicks will need to call the public sub. You will need to pass the range to the procedure.


    The public sub will need to pass the range along to the BeforeDoubleClick procedure.


    The way to simulate a double click of a cell is to call the BeforeDoubleClick event procedure and pass the appplicable range to it. The BeforeDoubleClick event procedure is private so you need a public procedure to allow calling the procedure from the outside.


    Actually, if the button is in the same worksheet, you don't need the public procedure. See attached file.
    Last edited by Cyclops; 05-22-2013 at 08:58 PM.

  9. #9
    Registered User
    Join Date
    05-20-2013
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    52

    Re: double click with macro

    Hi Cyclops

    I tried the above option but it did not worked my BPC function..

    We thought to drop this idea as it is not working..

    I really appreciate for your time and effort.

    Have a nice day!!

    cheerss!!

+ 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