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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -