title: Shape Names In Excel
body: <p>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).</p>
  
  <p><img src="https://i.stack.imgur.com/P7zBB.jpg" alt="How it looks in Excel"></p>
  
  <p>The shapes gets created, renamed and the text gets added but when I try to connect them I get the "Object Required".
  Can some one please help me.
  Thanks in advance.</p>
  
  <pre><code>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" &amp; i)
      s.TextFrame.Characters.Text = Range("C" &amp; 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
  </code></pre>