excel - Automatically create and name an Object from a set list -
i'm trying auto name objects referenced list rather have object text stated in script.
how script reference separate worksheet called process steps
text value in cell c7
instead of entering statement in script step 1
activesheet.shapes.addshape(msoshaperectangle, 50, 50, 100, 50).select selection.formula = "" selection.shaperange.shapestyle = msoshapestylepreset40 selection.shaperange(1).textframe2.textrange.characters.text = "step1"
peter has mentioned how pick value cell. taking bit ahead.
please avoid use of .select/.activate
interesting read
is trying?
sub sample() dim shp shape set shp = activesheet.shapes.addshape(msoshaperectangle, 50, 50, 100, 50) shp.oleformat.object .formula = "" .shaperange.shapestyle = msoshapestylepreset40 .shaperange(1).textframe2.textrange.characters.text = _ thisworkbook.sheets("process steps").range("c7").value end end sub
Comments
Post a Comment