![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Join Date: Jan 2004
Posts: 260
|
Hi
Maibe anyone can help. if i use this Code:
Set baas = Worksheets("Andmebaas")
mytext = baas.Range("J1").Value & _
vbCrLf & baas.Range("J2").Value & _
vbCrLf & baas.Range("J3").Value & _
vbCrLf & baas.Range("J4").Value & _
vbCrLf & baas.Range("J5").Value & _
vbCrLf & baas.Range("J6").Value & _
vbCrLf & baas.Range("J7").Value
With ActiveSheet.PageSetup
.RightHeader = mytext
End With
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Dec 2003
Location: Oregon, USA
Posts: 9,624
|
how about setting it manually in your code...
Code:
Sub printSetup()
Set baas = Worksheets("Andmebaas")
mytext = baas.Range("J1").Value & _
vbCrLf & baas.Range("J2").Value & _
vbCrLf & baas.Range("J3").Value & _
vbCrLf & baas.Range("J4").Value & _
vbCrLf & baas.Range("J5").Value & _
vbCrLf & baas.Range("J6").Value & _
vbCrLf & baas.Range("J7").Value
With ActiveSheet.PageSetup
.RightHeader = mytext
'set to whatever you want
.LeftMargin = Application.InchesToPoints(0.5)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.25)
.FooterMargin = Application.InchesToPoints(0.25)
End With
End Sub
ps. congrats on estonia's seat in the un!!
__________________
Regards, Zack Barresse All Excel Functions (If you would like comments in any code, please say so.) |
|
|
|
|
|
#3 |
|
Join Date: Jan 2004
Posts: 260
|
TY
yesterday estonia join with NATO http://www.natonews.com/ But this not help me. I need minimise space between rows. Try make header with this code and u see how ugly this. And worksheet first row above header last row. still need solution |
|
|
|
|
|
#4 |
|
Join Date: Jan 2004
Posts: 260
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|