Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Left Header in 2007
Hi,
I'm having trouble updating the left header. Have read some posts but haven't found solutions yet. Below is a subroutine that did work in Excel 2003, but I have had no luck in Excel 2007. The left header exists in page setup already. The macro is simply to refresh the text. Perhaps one of the lines of text is too long or something. But when just viewing the header in page layout view it seems ok. If anyone can tell me what may be wrong I would be greatly appreciative. Thanks in advance. Eric Sub refresh_header() Dim wk As Worksheet For Each wk In ThisWorkbook.Worksheets If wk.Visible = xlSheetVisible Then wk.Calculate Select Case Left(wk.Name, 2) Case "h_", "v_" wk.PageSetup.LeftHeader = "&08" & wk.Range("anchor").Offset(-7, 0) & vbCr & _ wk.Range("anchor").Offset(-6, 0) & vbCr & _ wk.Range("anchor").Offset(-5, 0) & vbCr & _ wk.Range("anchor").Offset(-4, 0) & vbCr & _ wk.Range("anchor").Offset(-3, 0) & vbCr & _ wk.Range("anchor").Offset(-2, 0) Case Else End Select End If Next wk End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to change the row header from right to left in Excel 2007 | New Users to Excel | |||
2003-2007"unable to set the Left header property of the PageSetup | Excel Programming | |||
Replace left header | Excel Programming | |||
header in right or left margin? | Excel Discussion (Misc queries) | |||
Header/Left margin | Excel Programming |