title: Proper use of Shell function when path contains spaces
body: <p>I am trying to open an image from Excel-VBA using the <code>Shell</code> function.
  The first line of code works, but I do not want it to open in Paint. I want it to open in Windows Live Photo Gallery as the second line of code suggests, but this line does not work. Can anyone tell me what the problem is?</p>
  
  <pre><code>Shell("mspaint.exe C:\test\Data_Sample\Figures\" &amp; ActiveCell.Value &amp; ".jpeg")
  Shell ("WLXPhotoGallery.exe C:\test\Data_Sample\Figures\" &amp; ActiveCell.Value &amp; ".jpeg")
  </code></pre>
  
  <p><strong>EDIT</strong>
  As BK201 suggested, I tried writing the full path to the WLXPhotoGallery executable; although this does open Windows Live Photo Gallery, it doesn't open the image I need. Why?</p>
  
  <pre><code>PGallery = "C:\Program Files (x86)\Windows Live\Photo Gallery\WLXPhotoGallery.exe"
  Pic = "C:\test\Data_Sample\Figures\" &amp; ActiveCell.Value &amp; ".jpg"
  Shell (PGallery &amp; " " &amp; Pic)
  </code></pre>