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

I got it fixed. Here is the code that worked. I recorded a marco to add the
Header/Footnote then adapted it for my use. Notice there is no vbNewLine or
anything like that. Not sure why it works, but it does.

Thanks for all your help.

Dim sh As Integer

For sh = 1 To Sheets.Count
With Sheets(sh).PageSetup

.LeftHeader = "&8Cilli Code: " & CLLI_Code_1.Value & Chr(10) &
"Office Name: " & Me.Office_1.Value
.CenterHeader = "&8TEO Number: " & Me.TEO_No_1.Value & Chr(10) &
"Supplier Order No: " & Me.CES_No_1.Value
.RightHeader = "&8Page &N of &N" & Chr(10) & "Appendix No: " &
Me.TEO_Appx_No_2.Value
.CenterFooter = _
"&8RESTRICTED - PROPRIETARY INFORMATION" & Chr(10) & "Not for use or
Disclosure outside ATT except under Written Agreement"
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.55)
.BottomMargin = Application.InchesToPoints(0.7)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -3
.CenterHorizontally = True
.CenterVertically = True
.Draft = False
.PaperSize = xlPaperLetter
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = True

End With
Next sh

End Sub

"joel" wrote:


Try instead of vbnewline vbcrlf or vbcr or vblf


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=165166

Microsoft Office Help

.

 
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 11:08 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"