Hello
Please I am new to excel programming and would like to get started.
Please tell me VBA script to insert company logo(image file) in right headers.
macro should ask me for image file path like below code is for headers and footers (text only)
Sub EnterHeader()
'
' Headers & Footer Macro
'
'
x = ActiveSheet.PageSetup.RightHeader
xx = InputBox("Enter Report Headers", "Headers", x)
y = ActiveSheet.PageSetup.RightFooter
yy = InputBox("Enter Report Footer", "Footers", y)
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
With ws.PageSetup
' .RightHeader = _
"BUS STATION" & Chr(10) & "OCTOBER 2013" & Chr(10) & "QUE LENGTHS"
.RightHeader = xx
'.RightFooter = "Client Name"
.RightFooter = yy
End With
Next ws
End Sub
Bookmarks