louiserace
New Member
- Joined
- Jun 24, 2015
- Messages
- 15
Hi
I am trying to retrieve the text that is in the center header
At the start of the program I ask the user for a sheet title
which I later use in the print setup
However, if the program is run again, I would like to put the current header as the default on the inputBox.
I am sure there must be an easy way to do this but I cannot find it, so I am hoping someone can help.
Thanks
I am trying to retrieve the text that is in the center header
At the start of the program I ask the user for a sheet title
Code:
sheetTitle = InputBox("Please input title for sheet", "Title")
which I later use in the print setup
Code:
With ActiveSheet.PageSetup
.CenterHeader = "&""Calibri,Bold""&20" & sheetTitle
End With
However, if the program is run again, I would like to put the current header as the default on the inputBox.
I am sure there must be an easy way to do this but I cannot find it, so I am hoping someone can help.
Thanks