Variable Image in Header

G

Graham

Hi

I am trying to insert an image into the header based on a variable in the
same worksheet.
I have a 'messy?' solution involving returning to a cell, a file name for an
image.

then using the following code, replace logo.jpg with the cell reference.

Sub InsertPicture()

With ActiveSheet.PageSetup.LeftHeaderPicture
.Filename = "C:\Temp\logo.jpg"
.Height = 100
.Width = 150
.Brightness = 0.36
.ColorType = msoPictureAutomatic
.Contrast = 0.39
.CropBottom = 0
.CropLeft = 0
.CropRight = 0
.CropTop = 0
End With

' Enable the image to show up in the left header.
ActiveSheet.PageSetup.LeftHeader = "&G"

End Sub




Is this a reasonable solution?
What is the syntax?

Any help is appreciated

Graham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top