ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formatting Codes for header and footer (https://www.excelbanter.com/excel-programming/287011-formatting-codes-header-footer.html)

chambers777

Formatting Codes for header and footer
 
How can I use VBA to change the formatting of an already formatte
Header???

Dim Value
Value = ActiveWorkbook.Worksheets(1).PageSetup.CenterFoote r
ActiveWorkbook.Worksheets(1).PageSetup.CenterFoote r
"&""Courier""" & Value

I've used this, but it doesn't remove the previous formatting whic
stays in tact

--
Message posted from http://www.ExcelForum.com


mudraker[_70_]

Formatting Codes for header and footer
 
Remove value = from the start of your code

ActiveWorkbook.Worksheets(1).PageSetup.CenterFoote r
ActiveWorkbook.Worksheets(1).PageSetup.CenterFoote r = "&""Courier""" &
Value


---
Message posted from http://www.ExcelForum.com/


chambers777[_2_]

Formatting Codes for header and footer
 
This code:
Dim Value
ActiveWorkbook.Worksheets(1).PageSetup.CenterFoote r
ActiveWorkbook.Worksheets(1).PageSetup.CenterFoote r = "&""Courier""" &
Value

Returns "CenterFooter method of PageSetup class failed"


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 12:19 AM.

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