jtakw
Well-known Member
- Joined
- Jun 29, 2014
- Messages
- 7,245
- Office Version
- 2016
- Platform
- Windows
Hi Everyone,
I have the following macro to update the Center Header, it works fine but won't work if I enter anything that starts with a number or numbers only.
If I take out the formatting part, then it'll work, but I would really like to keep the formatting.
This is just the part of my code that deals with the Center Header.
What's wrong with my macro?
I'm using 2010,
Thanks for helping.
I have the following macro to update the Center Header, it works fine but won't work if I enter anything that starts with a number or numbers only.
If I take out the formatting part, then it'll work, but I would really like to keep the formatting.
This is just the part of my code that deals with the Center Header.
What's wrong with my macro?
Code:
Application.ScreenUpdating = False
Center = InputBox("Enter Center Header")
If Center = "" Then Exit Sub
Application.StatusBar = "Changing header/footer in " & sh.Name
sh.PageSetup.CenterHeader = "&""Calibri,Bold""&14" & Center
MsgBox ("Center Header Changed to ") & Center
Application.StatusBar = False
Application.ScreenUpdating = True
I'm using 2010,
Thanks for helping.