LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default Update Headers & Footnotes from User Form

I am trying to get the Header/Footnote to update on all sheets in a Workbook
without changing the page formatting. Some of the Sheets are Portrait and
some are landscape. I have a User Form that already has the data in some Text
Boxes.

There is a Control Button (Update_Engineer_Spec_10) that when pushed takes
the information on the User Form and Updates the Workbook, but I would like
to Update the Header / Footnot as well.

The Header was supposed to look like this.
Town: TEO No: Page 1 of ?
Office: Supplier Order No: Appendix No:

Town = City_1
Office = Office_1
TEO No = TEO_No_1
Supplier Order No = CES_No_1
Appendix No = TEO_Appx_No_2

Here is the code I have, but it dosen't seem to work. The truth is nothing
happens.

'Update Header Footnote Information
Sub DynamicHeader()

Dim sh As Integer

For sh = 1 To Sheets.Count
With Sheets(sh).PageSetup
.LeftHeader = "Town:" & Me.City_1.Value & vbNewLine _
& "Office:" & Me.Office_1.Value

.CenterHeader = "TEO No:" & Me.TEO_No_1.Value & vbNewLine _
& "Supplier Order No:" & Me.CES_No_1.Value

.RightHeader = "Page &P of &N" & vbNewLine _
& "Appendix No:" & Me.TEO_Appx_No_2.Value

.LeftFooter = "Left Footer if desired"

.CenterFooter = "Center Footer if desired"

.RightFooter = "Right Footer if desired"

.TopMargin = Application.InchesToPoints(0.25)

End With
Next sh

End Sub

Thanks
 
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
Wookbook Update from User Form Brian Excel Programming 8 December 22nd 09 12:51 PM
Update user form labels Jim Excel Programming 2 June 21st 07 10:43 AM
User Form: Cannot Update Text Box Charles in Iraq Excel Discussion (Misc queries) 0 October 12th 06 07:53 AM
Update Range from User Form fybar[_2_] Excel Programming 1 April 2nd 06 01:27 AM
Find and Update with User Form prodsched[_7_] Excel Programming 0 May 18th 04 03:35 PM


All times are GMT +1. The time now is 02:09 PM.

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

About Us

"It's about Microsoft Excel"