VBA 'true' simulation of double-click

i_excel

Board Regular
Joined
Jun 4, 2015
Messages
113
I've seen the sendkeys ("F2") workaround, but I'm interested in whether or not a double-click event can really be simulated with vba.

Any help appreciated.
i_excel
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Explain what you think in the Sendkeys option is different to the normal double click.
 
Upvote 0
Eg. If i double-click on a chart series it opens the properties dialogue for that element (on mac), whereas F2 places the cursor in the formula bar (in which the series formula is displayed).
 
Upvote 0
Not home to test but what happens if you do a
VBA Code:
Application.SendKeys "{ENTER}"
after the Application.SendKeys "{F2}"?
 
Upvote 0
Sorry, I meant by my example to demonstrate that sendkeys F2 is not equivalent to a double click. I'm on mac, so I don't think sendkeys is an option.
 
Upvote 0
On a Mac I think you will struggle as you can't use SendKeys (that isn't a bad thing) or API's. I think your only sensible option would be AppleScript down the lines of the thread below (which I haven't read through fully or see if there is a close option).

 
Upvote 0
Thanks, yeah.. it's not seeming simple that's for sure. Frustrating that the functionality available in excel2011 isn't available in subsequent editions of excel - it was very straightforward in 2011.
 
Upvote 0
Frustrating that the functionality available in excel2011 isn't available in subsequent editions of excel - it was very straightforward in 2011

Couldn't say I am afraid, the last time I had a Mac I was on 2008 (which didn't have VBA at all ;)) VBA has supposed to have improved a bit in the latest versions for Mac but I am only going by what others have stated.

Not having SendKeys isn't a bad thing though.
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top