title: How to insert picture from resources to Excel sheet, using VB2010
body: <p>I'm trying to <strong>add a picture to an Excel sheet, using a picture in the resources file</strong>, using VB2010. I can do it using: <code>xlDATAWorkSheet.Shapes.AddPicture(...)</code> with the path coded in, but I want to use it from the resources file. 
  This is what I've tried:
  <code>xlDATAWorkSheet.Shapes.AddPicture(CType(My.Resources.ResourceManager.GetObject("Logo"), Bitmap), False, True, 0, 0, 300, 50)</code> , but I get an <strong>error: file not found (pointing to the Logo word)*</strong></p>
  
  <p>I also tried:
  <code>xlDATAWorkSheet.Shapes.AddPicture(My.Resources.Logo, False, True, 0, 0, 300, 50)</code> , but I get same <strong>error: file not found.</strong></p>
  
  <p>It works fine with the path to the picture hard coded, like <code>xlDATAWorkSheet.Shapes.AddPicture("C:/Logo.jpg", False, True, 0, 0, 300, 50),</code> but I want to use it from the resource file (so it will run on another machine)</p>
  
  <p>Also, this works ok, so Logo image is really there:</p>
  
  <pre><code>frmMain.pic1.Image = CType(My.Resources.ResourceManager.GetObject("Logo"), Image)
  </code></pre>
  
  <p>It seems though, according to the MSDN docs for Shapes, there does not appear that AddPicture takes anything other than a string to determine what image you want to insert.</p>
  
  <p>Can anyone help insert a picture from the resources to an Excel sheet in VB2010?</p>