title: Change comment size relative to original size of fill picture in Excel vba
body: <p>Trying to write a VBA excel macro that will allow me to insert a picture as a pop-up on mouseover of a cell.</p>
  
  <p>I'm accomplishing this by inserting a comment in the cell and setting the comment's fill to be a specified picture.</p>
  
  <p>I would like the picture to maintain its original scaling</p>
  
  <p>After setting the comment to use the picture as a fill background, I can manually right-click the cell, click edit comment, right-click the comment, go to the "size" tab, select "Relative to original picture size" checkbox, and set scale height and size to be 100%, which achieves the desired effect, as shown below:<a href="https://i.stack.imgur.com/si0Mq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/si0Mq.png" alt="enter image description here"></a></p>
  
  <p>Recording a macro to see what the VBA to replicate this is results in nothing being recorded.</p>
  
  <p>Using the <code>targetComment.Shape.ScaleHeight 1, msoTrue</code> results in an error:</p>
  
  <pre><code>Run-time error '-2147024891 (80070005)':
  The RelativeToOriginalSize argument applies only to a picture or an OLE object
  </code></pre>
  
  <p>Here is a screenshot of the VBA code that generates this error:</p>
  
  <p><a href="https://i.stack.imgur.com/QzBzV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QzBzV.png" alt="enter image description here"></a></p>
  
  <p>Does anyone know how to access what is in the dialog box via VBA???</p>