1

I have an Excel sheet where I am using an image in the header. From this question I already know how to add or link images as Shapes in an Excel sheet.

Now I need to do something similar to the header, where I can link an Image to the header instead of saving the image in the Workbook (because I have a lot of images which makes the file size huge).

Community
  • 1
  • 1
Ayman
  • 1,387
  • 4
  • 20
  • 35

1 Answers1

2

Code:

Sheet.PageSetup.LeftHeaderPicture.Filename

You need to set the Filename property of the _____HeaderPicture property to the path of the picture you want to use.

Community
  • 1
  • 1
Mr. Mascaro
  • 2,693
  • 1
  • 11
  • 18
  • It works, but the problem is it stores the image inside the excel sheet once it is saved. I just need to **link** not to store the image inside the header. – Ayman Nov 04 '14 at 14:50
  • You could always set it to link the image only when the file is open and then remove it before save... – Mr. Mascaro Nov 04 '14 at 14:53
  • Well the file is developed for non IT users which do heavy process on the sheet, so this option is very difficult to implement. – Ayman Nov 04 '14 at 14:56
  • Actually I added a button that can remove the image from the Header once the user is finished printing. The events idea is good too. thanks mate :) – Ayman Nov 04 '14 at 15:06
  • 1
    I don't even trust users to push buttons :-) – Mr. Mascaro Nov 04 '14 at 15:14