r/vbaexcel•
Animosity16

Reference a shape by name located in a cell

Trying to loop through shapes based on the names that are on another worksheet. I've tried the following and had no luck.

For i = 1 to colcount .... If dataws.cells(2,i).value > 2 then Imagews.shapes(dataws.cells(1,I)).fill.forecolor.rgb=vbblue

End if Next I

I've also tried and and managed to get it to create the shapes on a non visible ws with the names form those cells. I wanted to pickup the formatting and apply it to the shape I need as a work around. But I don't know what code to use to make it create the shape based on that name then pickup the format and apply. Any help.

Posted Sep 12, 2019, 3:53 AM UTC

11
Loading comments…