title: Resizing picture in Excel VBA
body: <p>I have got a VBA script that will fetch pictures and stick them into a specific cell in Excel, depending on another cell's value.</p>
  
  <pre><code>Public Function PictureLookup(Value As String, Location As Range, Index As Integer)
  
  Application.Volatile
  
  Dim lookupPicture As Shape
  Dim sheetName As String
  Dim picTop As Double
  Dim picLeft As Double
  
  sheetName = Location.Parent.Name
  
  'Delete current picture with the same Index if exists
  For Each lookupPicture In Sheets(sheetName).Shapes
      If lookupPicture.Name = "PictureLookup" &amp; Index Then
          lookupPicture.Delete
      End If
  Next lookupPicture
  
  'Get position of cell calling the UDF
  picTop = Location.Top
  picLeft = Location.Left
  
  'Add the picture in the right location
  Set lookupPicture = Sheets(sheetName).Shapes.AddPicture _
  ("G:\My Drive\MY FOLDER\LOGOS\" &amp; Value &amp; ".jpg", msoFalse, msoTrue, picLeft, picTop, -1, -1)
  
  'change the picture name
  lookupPicture.Name = "PictureLookup" &amp; Index
  
  PictureLookup = ""
  
  End Function
  </code></pre>
  
  <p>At the moment, the pictures are inserted into Excel in their original size. I would like for all of them to have the exact size of 0.38x0.38. I can't seem to figure out which properties to change in the script so that that can happen.</p>
  
  <p>Thank you</p>