vba - Dynamic labelling of shapes -
i creating shapes within for-loop , want each shape having different name. therefore, shape in set shape = ... in each iteration should have shape replaced dynamic variable. if place shapes via set shape = w.shapes.addshape(msoshaperectangle, 10,10,10,10) how can have shape (the name of shape) dynamic e.g. set cells(1 + i, 1) = w.shapes.addshape(msoshaperectangle, 10,10,10,10) ... each shape has different name. tried shape.name = not seem have same effect setting name while creating shape. i assign name each shape create within loop: shape.name = cells(ganttstartrow + i, 1) & cells(ganttstartrow + i, 2) i set connector via set conn = w.shapes.addconnector(msoconnectorelbow, 1, 1, 1, 1) conn.connectorformat.beginconnect d, 1 conn.connectorformat.endconnect wp, 1 ... receive "type mismatch" error. assuming ws worksheet working with: dim s shape, integer = 1 5 set s = ws.shapes.addshape(msoshaperectangle, 50 + * 120, 200, 100, 100) s.name...