(Solved) – VBA to get selected shape name in Combobox

(solved)-–-vba-to-get-selected-shape-name-in-combobox

I am new to VBA. i have few shapes in a worksheet. (Using those to design label)
I want to get the name of shape to appear in combobox and character name in another Combobox, when any particular shape is selected. so i can rename that shape and link to particular excel column.

i have tried following.

With Selection
    ActiveSheet.ComboBox1.Value = ActiveSheet.Shapes(Application.Caller).Name
End with

Not sure where to assign above code.

I tried assigning above code to a shape with .onaction as macro, it work but a marco assiged shape cannot be edited further(For design purpose).

Also It would be great if i can delete selected shape.

enter image description here

Thank you in advance.

Leave a Reply

Your email address will not be published. Required fields are marked *