title: VBA UserForm Get Filename
body: <p>I have constructed a UserForm that consists of 2 CommandButtons, each of which contains a Picture. The user is asked to select one of the two CommandButtons. I would like the filename of the picture selected to be copied to a cell in a worksheet. At the moment I can't figure out how to get the filename of the picture and so I have manually inserted the filename for each CommandButton, as such:</p>
  
  <pre><code>Private Sub cmdQ2Opt1_Click()
      Worksheets("UserQuestionnaire").Range("C4").Value = "242.216.490"
  End Sub
  
  Private Sub cmdQ2Opt2_Click()
      Worksheets("UserQuestionnaire").Range("C4").Value = "354.129.401"
  End Sub
  </code></pre>
  
  <p>How can I code this so that VBA automatically copies the picture's filename?</p>
  
  <p>Thanks in advance for the help! </p>