How To Insert Image In Excel Using VBA

How to insert image in Excel Using VBA?

  1. Save this vba snippet in a .txt file:

Sub InsertImageToExcel(imagePath,workSheetName, cell)

Set myDocument = Worksheets(workSheetName)

myDocument.Shapes.AddPicture _

imagePath, _

False, True, Range(cell).Left, Range(cell).Top, -1, -1

End Sub

  1. Use Invoke VBA inside an Excel Application Scope.

EntryMethodParameters: {strImagePath, strWorksheetName, strCell}

Example of EnterMethodParameters: {"C:\Users\UserAccount\Downloads\sample.jpg", "Sheet1", "A1"}