ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing the contents on a named range in the Header of an Excel s (https://www.excelbanter.com/excel-programming/421052-printing-contents-named-range-header-excel-s.html)

Dots

Printing the contents on a named range in the Header of an Excel s
 

I want to print the contents of a named range in the header of my document
when I go to print the worksheet. In the custom header options, this is not
available. Is there a way to do this and can you tell me how? Thanks!

Dots

Gary''s Student

Printing the contents on a named range in the Header of an Excel s
 

Assuming that the Name blockk has already been assigned to some cell:

Sub Macro1()
ActiveSheet.PageSetup.CenterHeader = Range("blockk").Value
End Sub
--
Gary''s Student - gsnu200819


"Dots" wrote:

I want to print the contents of a named range in the header of my document
when I go to print the worksheet. In the custom header options, this is not
available. Is there a way to do this and can you tell me how? Thanks!

Dots



All times are GMT +1. The time now is 11:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com