Use VBA to copy an image from headers/footers of one sheet to another

后端 未结 3 2070
眼角桃花
眼角桃花 2021-01-22 03:05

I need to write a VBA code to copy a company logo in the headers/footers of one excel sheet to another sheet in another workbook. Any ideas?

3条回答
  •  醉酒成梦
    2021-01-22 04:09

    One workaround is to copy the original worksheet to the new workbook:

       ' macro on the source workbook
        Sheets("Sheet1").Move After:=Workbooks("Book2").Sheets(3)
    

    When you do this, you get a worksheet in the destination workbook with all the features of the original, including footers and headers, you can then copy all the content you want into the new worksheet

提交回复
热议问题