# VBA Double-Click selection shape in worksheet



## geloader0 (Dec 22, 2022)

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.


----------



## Micron (Dec 22, 2022)

The syntax to pass the clicked shape text could be something like this
UserForm.TextBox1 = ActiveSheet.Shapes(Application.Caller).TextFrame.Characters.Text


----------



## geloader0 (Dec 22, 2022)

It is impossible to do double-click event on a shape in worksheet to open a userform?


----------



## Micron (Dec 22, 2022)

If you say so. I would say not impossible.


----------



## geloader0 (Dec 22, 2022)

Not working in Worksheet_BeforeDoubleClick event for the shapes?


----------



## Micron (Dec 22, 2022)

Worksheet_BeforeDoublelClick applies to the sheet, not a shape. You said


geloader0 said:


> If I want to *double-click* one of those *shapes*


so that's what I based my answer on.


----------



## geloader0 (Dec 22, 2022)

Oh is that so. I thought Worksheet_BeforeDoubleClick works on shapes. Thank you so much though.


----------

