ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Custom Worksheet Header (https://www.excelbanter.com/excel-programming/322690-custom-worksheet-header.html)

Brenda

Custom Worksheet Header
 
I had this as my header
ActiveSheet.PageSetup.CenterHeader = DBID_Name + " Import"

Then I wanted to format my header and created a macro to see the code. Ended
up with this
..CenterHeader = "&""Arial,Bold""&12Collateral Import"

How do I take the formatted header, but still use the variable DBID_Name in
in place of the literal Collateral in the header? I can not get the syntax
correct.

Brenda



PaulD

Custom Worksheet Header
 
"Brenda" wrote in message
...
<snip
: Then I wanted to format my header and created a macro to see the code.
Ended
: up with this
: .CenterHeader = "&""Arial,Bold""&12Collateral Import"
:
: How do I take the formatted header, but still use the variable DBID_Name
in
: in place of the literal Collateral in the header? I can not get the syntax
: correct.
:
: Brenda
:

try
..CenterHeader = "&""Arial,Bold""&12" & DBID_Name & " Import"
Paul D




All times are GMT +1. The time now is 04:39 PM.

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