Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
try:
Private Sub Workbook_BeforePrint(Cancel As Boolean) If ActiveSheet.Name = "Sheet1" Then ActiveSheet.PageSetup.RightHeader = ActiveSheet.Range("K1").Value + 1 End If End Sub "Jennifer-Houston, TX" wrote: have it change everytime you print. I got a great answer last time in the cell format, but now I need to put it in the header part. This is what I am using to do the regular printing: Private Sub Workbook_BeforePrint(Cancel As Boolean) If ActiveSheet.Name = "Sheet1" Then ActiveSheet.Range("K1").Value = ActiveSheet.Range("K1").Value + 1 End If End Sub I am still learning and would like to know how to change it to the right header. Thanks, Jennifer |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
what code pulls in contents of a cell in an Excel header/footer? | Excel Discussion (Misc queries) | |||
Convert a Number Code to a Text Code | Excel Discussion (Misc queries) | |||
VBA Code to Add the same header from my first sheet into 20 sheets | Excel Worksheet Functions | |||
how can i put a unique number in a header for a git certificat for | Excel Discussion (Misc queries) | |||
How do i number pages in a header consequently | Excel Worksheet Functions |