vba shape add text code example
Example 1: add text to Shape VBA
ActiveWorksheet.Shapes(shapeIndex/Name).TextFrame2.TextRange.Text = "Hello shape"
Example 2: Add Formula to Shape Text in VBA
Activesheet.Shapes(i).DrawingObject.Formula = "=A1"
ActiveWorksheet.Shapes(shapeIndex/Name).TextFrame2.TextRange.Text = "Hello shape"
Activesheet.Shapes(i).DrawingObject.Formula = "=A1"