Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change the row header from right to left in Excel 2007 MS Ecel 2007 left to right orientation c New Users to Excel 2 April 14th 09 04:52 PM
2003-2007"unable to set the Left header property of the PageSetup Miri Excel Programming 2 August 14th 07 07:42 AM
Replace left header GregR Excel Programming 2 June 29th 06 04:04 PM
header in right or left margin? Michelle Excel Discussion (Misc queries) 2 January 26th 05 04:44 PM
Header/Left margin PO Excel Programming 2 August 30th 04 06:31 PM


All times are GMT +1. The time now is 04:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"