How to insert images and background in Excel via VBA Macro

Опубликовано: 12 Май 2026
на канале: OEA Excel Avanced VBA Macros
580
2

We've ever wanted is to insert background or just images (from company stationery) in our Excel reports, dashboards? Here is how you do it.

Start recording macro into a fresh new Excel file and start adding image and in another macro recording add a background. Lo there you go! Done!!

Isn't that simple!? Here is the VBA code for you with all my love :)


Sub AddImage()
Attribute AddImage.VB_ProcData.VB_Invoke_Func = " \n14"
'
' Inserts images into active sheet
' Change the image name and path from your local drive.

'
Range("C1").Select 'wherever you want to insert the picture starting cell
ActiveSheet.Pictures.Insert( _
"C:\Users\Sameer Patole\Google Drive\24.Advance Excel Training\Art\FB_banner.png" _
).Select
Range("A1").Select
End Sub



Sub AddBackG()
Attribute AddBackG.VB_ProcData.VB_Invoke_Func = " \n14"
'
' Inserts background into active sheet
' Change the image name and path from your local drive.
'

'
ActiveSheet.SetBackgroundPicture Filename:= _
"C:\Users\Sameer Patole\Google Drive\24.Advance Excel Training\Art\Banner.png"
ActiveWindow.SmallScroll Down:=-18
Range("A1").Select
End Sub