title: save imported picture in excel using vba
body: <p>So I have a macro assigned to a command button. when pressed it opens a dialogue box for user to import a picture file. Then it resizes the image and puts it on a specific cell. 
  But If I move the original picture file location, the image disappears in Excel. Is there any chance I can save it inside the excel file so that it will not matter if I move the original file location.</p>
  
  <p>The code is as follow:</p>
  
  <pre><code>    Sub Add_Image()
      Application.ScreenUpdating = False
      Range("B18").Select
      'varible Picture1 is inserted down below - ***change both***
      Picture1 = Application.GetOpenFilename("Picture,*.JPG,Picture,*.JPEG,Picture,*.GIF,Picture,*.BMP")
      'edit "("Picture,*.*")" section to add or chanve visible file types
      On Error GoTo ErrMsg
      ActiveSheet.Pictures.Insert(Picture1).Select
      Selection.ShapeRange.LockAspectRatio = msoFalse
      Selection.ShapeRange.Height = 145
      Selection.ShapeRange.Width = 282
      Application.ScreenUpdating = True
      Exit Sub
  ErrMsg:
      MsgBox ("Failed to load Image"), , "Error"
  End Sub
  </code></pre>