In Excel, I have a macro that formats all of my PageSetup stuff. I would like for the macro to prompt me to input a title in the .CenterHeader. Is this possible? Here is the code for the macro as it is now.
Sub PageSetupLandscape()
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.LeftHeader = "&G"
ActiveSheet.PageSetup.LeftHeaderPicture.Filename = _
"C:\Documents and Settings\Me\My Documents\My Pictures\MyPicture.jpg"
With ActiveSheet.PageSetup.LeftHeaderPicture
.Height = 27.75
.Width = 93.75
End With
.RightHeader = "&D"
.CenterHeader = "&""-,Bold""&16Enter Title"
.RightFooter = "Page &P of &N"
.CenterFooter = ""
.LeftFooter = ActiveWorkbook.FullName
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintGridlines = True
.PrintHeadings = True
.CenterHorizontally = True
.Orientation = xlLandscape
End With
Sub PageSetupLandscape()
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.LeftHeader = "&G"
ActiveSheet.PageSetup.LeftHeaderPicture.Filename = _
"C:\Documents and Settings\Me\My Documents\My Pictures\MyPicture.jpg"
With ActiveSheet.PageSetup.LeftHeaderPicture
.Height = 27.75
.Width = 93.75
End With
.RightHeader = "&D"
.CenterHeader = "&""-,Bold""&16Enter Title"
.RightFooter = "Page &P of &N"
.CenterFooter = ""
.LeftFooter = ActiveWorkbook.FullName
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.75)
.BottomMargin = Application.InchesToPoints(0.75)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintGridlines = True
.PrintHeadings = True
.CenterHorizontally = True
.Orientation = xlLandscape
End With