VBA Double-Click selection shape in worksheet

geloader0

Board Regular
Joined
Dec 21, 2022
Messages
52
Office Version
  1. 2016
Platform
  1. Windows
Hello Good day everyone,

Example, if I have many shapes in a worksheet with a text inside. If I want to double-click one of those shapes then it will pass the text of shapes to a userform textboxes.

Anyone can share me a code? Your help is much appreciated. Thank you so much.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
The syntax to pass the clicked shape text could be something like this
UserForm.TextBox1 = ActiveSheet.Shapes(Application.Caller).TextFrame.Characters.Text
 
Upvote 0
It is impossible to do double-click event on a shape in worksheet to open a userform?
 
Upvote 0
Not working in Worksheet_BeforeDoubleClick event for the shapes?
 
Upvote 0
Oh is that so. I thought Worksheet_BeforeDoubleClick works on shapes. Thank you so much though.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,588
Members
449,089
Latest member
Motoracer88

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