Sub InsertPicture()
With ActiveSheet.PageSetup.CentertFooterPicture
.FileName = "C:\Sample.jpg"
.Height = 275.25
.Width = 463.5
.Brightness = 0.36
.ColorType = msoPictureGrayscale
.Contrast = 0.39
.CropBottom = -14.4
.CropLeft = -28.8
.CropRight = -14.4
.CropTop = 21.6
End With
' Enable the image to show up in the left header.
ActiveSheet.PageSetup.LeftHeader = "&G"
' Enable the image to show up in the center footer.
ActiveSheet.PageSetup.CenterFooter = "&G"
End Sub
Wednesday, June 24, 2026
VBA Excel - Add Picture from a folder into Excel sheet header
PageSetup object (Excel)Represents the page setup description.The PageSetup object contains all page setup attributes (left margin, bottom margin, paper size, and so on) as properties.
The following example adds a picture titled Sample.jpg from the C:\ drive to the left section of the header. This example assumes that a file called Sample.jpg exists on the C:\ drive.
Subscribe to:
Post Comments (Atom)
Hot Topics
-
In previous post , we learnt basic introduction to SQL Server . In this post we will learn about SSMS (SQL Server Management Studio) softwar...
-
In the previous post we have learnt about SSMS (SQL Server Management Studio) and how to connect with a SQL Server instance. In this post w...
-
By Ajeet Kumar RADAR CHART In radar chart, the categorical variable is displayed as spikes radiating from a central point. The values o...
No comments:
Post a Comment