ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Create a two-line header programmatically (https://www.excelbanter.com/excel-programming/317718-create-two-line-header-programmatically.html)

Jeanne Conroy

Create a two-line header programmatically
 
Hi:

Can anyone tell me how to create a two-line header for a worksheet using
vba? I have a client who wants a data-specific date range in the header as
well as the company name. I want to put this in two lines in the header.
Currently the dates are inserted in the VBA code. Both the company name and
the dates should in the center header. Any help would be greatly
appreciated.

JJ



Tom Ogilvy

Create a two-line header programmatically
 
As an example:

ActiveSheet.PageSetup.CenterHeader = "ABCD" & vbcr & "EFGH"

--
Regards,
Tom Ogilvy


"Jeanne Conroy" wrote in message
...
Hi:

Can anyone tell me how to create a two-line header for a worksheet using
vba? I have a client who wants a data-specific date range in the header

as
well as the company name. I want to put this in two lines in the header.
Currently the dates are inserted in the VBA code. Both the company name

and
the dates should in the center header. Any help would be greatly
appreciated.

JJ






All times are GMT +1. The time now is 07:15 PM.

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