ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   finding pure pageheader text??? (https://www.excelbanter.com/excel-programming/417792-finding-pure-pageheader-text.html)

Charlotte E.

finding pure pageheader text???
 
I need to read the contents of the left pageheader - no problem:

Titel = ActiveSheet.PageSetup.LeftHeader


Problem occur if the users has change the format of the text!

That way I might get something like this:

Titel = "&""Times New Roman,Bold""&12Expenses 2008"


How to only read the pure text of the header?
(In this case: "Expenses 2008")


Problem is that I cannot know what font, format or size (if any) the user
might have given the header!

Can someone help my???


Thanks,



JLGWhiz

finding pure pageheader text???
 
If you only want to view the headers and footers, then:

Sub viewHeader()
MsgBox ActiveSheet.PrintPreview
End Sub

However, you can do this manually in Excel. Otherwise, the header/footer
information is returned in code form when called with the constants
LeftHeader, RightHeader, etc. If you enter header or footer data in clear
text, it will return clear text. Otherwise, you would have to return the
variable value for the text you want to display.

"Charlotte E." wrote:

I need to read the contents of the left pageheader - no problem:

Titel = ActiveSheet.PageSetup.LeftHeader


Problem occur if the users has change the format of the text!

That way I might get something like this:

Titel = "&""Times New Roman,Bold""&12Expenses 2008"


How to only read the pure text of the header?
(In this case: "Expenses 2008")


Problem is that I cannot know what font, format or size (if any) the user
might have given the header!

Can someone help my???


Thanks,





All times are GMT +1. The time now is 08:52 AM.

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