Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Footer Picture
How do I copy the footer/header picture from one worksheet to another?
The following code will put the existing picture into the Graph object but when I try to set the Graph object of the new workbook I get an error... Sub CopyFooterPicture() On Error GoTo Trap Dim wkOld As Worksheet, wkNew As Worksheet Dim gphOld As Graphic, gphNew As Graphic ' get existing picture Set wkOld = ThisWorkbook.Sheets("sheet1") Set gphOld = wkOld.PageSetup.CenterFooterPicture ' new worksheet and picture Set wkNew = ThisWorkbook.Worksheets.Add ' display the footer wkNew.PageSetup.CenterFooter = "&G" ' get the new picture Set gphNew = wkNew.PageSetup.CenterFooterPicture ' this bombs, since the Old filename is just the filename of the original picture file w/o the extension gphNew.Filename = gphOld.Filename Exit Sub Trap: Debug.Print Err.Number & ": " & Err.Description End Sub Thanks, -- Richard |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Picture only in footer of last page? | Excel Discussion (Misc queries) | |||
Need help inserting picture into header/footer | New Users to Excel | |||
How to insert a picture in the Footer (not the Header) in Excel 20 | Excel Worksheet Functions | |||
How to keep a picture in Excel 97 page footer/header? | Excel Programming | |||
Inserting picture in footer with macro | Excel Programming |