Paste text into a header
Below is code I recorder, and below it is after editing it...
Replace the text with a cell reference, a text reference, a result
from an InputBox or form, or a variable.
==========================
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.LeftHeader = "Left Header"
.CenterHeader = "Center Header"
.RightHeader = "Right Header"
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
================================
With ActiveSheet.PageSetup
.LeftHeader = "Left Header"
.CenterHeader = "Center Header"
.RightHeader = "Right Header"
End With
========================================
--
steveB
Remove "AYN" from email to respond
"Danny Springer" wrote in message
...
STEVE BELL wrote:
How do you get the text?
Are you talking of a header on the worksheet or
about a header in the print set-up?
I am talking about a header in the print set-up. If I record a macro and
paste my text, I will find the text in my macro, not the command "paste".
Regards,
Danny
|