I have a VBA sub to create a few shapes, these shapes are then renamed to a cell value (B5:B15) and add text (C5:C15).
When I try to link the shapes, I receive the "Object Required" message even after I have created, renamed, and added the text. Could someone kindly assist me. I appreciate it.
Sub Button1_Click()
Dim s, conn As Shape, i As Integer
Set w = ActiveSheet
For i = 5 To 7
Set s = w.Shapes.AddShape(1, 800, i * 120 - 599, 100, 100)
s.Name = Range("B" & i)
s.TextFrame.Characters.Text = Range("C" & i)
s.Fill.ForeColor.RGB = RGB(0, 0, 213)
s.TextFrame.Characters.Font.ColorIndex = 19
Next i
Set conn = w.Shapes.AddConnector(1, 1, 1, 1, 1)
conn.ConnectorFormat.BeginConnect A001, 1
conn.ConnectorFormat.EndConnect A002, 1
End Sub