title: VBA dynamic pictures
body: <p>I am trying to insert a picture into excel based off a cell value. The Cell value is in the image path.  I am new, what I have is partially based on recording the macro and part from looking stuff up.  This is what I tried... </p>
  
  <p>I keep getting an error on the <code>ActiveSheet.Pictures.Insert</code> line</p>
  
  <pre><code>Sub Part_Picture()
  '
  ' Part_Picture Macro
  '
  Dim imageName As String
  Dim imageFolder As String
  Dim imagePath As String
  
  For Each Cell In Range("B7")
      imageName = Cell.Value
      imageFolder = "Q:\New Project Part Folders\Elizabeth Delgado\Database pictures\Part\" &amp; imageName
      imagePath = imageFolder &amp; ".jpg"
  
      Range("B11").Select
      '
      ActiveSheet.Pictures.Insert(imagePath).Select
  Next Cell
  End Sub
  </code></pre>