View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Brian Brian is offline
external usenet poster
 
Posts: 683
Default Update Headers & Footnotes from User Form

I can go into page setup and manualy remove the line space. I even tried it
on a blank page and it did the same thing. For some reason it only puts the
extra line space in when the code runs. There has to be something in the code
that (VBNewLine) that is putting the extra line in.

Town / TEO No / Page These are in the corrcet location 1/4"
from the top
Unwanted Line Space (Needs to
be removed)
Office / Supp Order / Appd No Needs to be moved up


I am at a total loss over this. I have looked at all the help sections and
there is nothing about this matter.


"joel" wrote:


could the double line be at the top of the 1st row of the worksheet?
the code below removes the border at the top of row 1.

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

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

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

.CenterFooter = "&8RESTRICTED - PROPRIETARY INFORMATION" &
vbNewLine & _
"Not for Use or Disclosure outside AT&T except under Written
Agreement "

.LeftFooter = ""
.RightFooter = ""
.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)

.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = True

End With

With Sheets(sh)
With Rows(1).Borders(xlEdgeTop)
.LineStyle = xlNone
End With

End With
Next sh


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

Microsoft Office Help

.