View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Make text in a cell appear in a footer

adapt this to what you need, just watch for word-wrap.


Sub Print_sheet()
Dim ws As Worksheet
Dim rng As Range
Dim lastrow As Long
Set ws = Worksheets("sheet1")
lastrow = ws.Cells(Rows.Count, "I").End(xlUp).Row
Application.ScreenUpdating = False
Set rng = ws.Range("D1:R" & lastrow)

With ws
With .PageSetup
.Orientation = xlLandscape
.FooterMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.4)
.LeftMargin = Application.InchesToPoints(0.4)
.TopMargin = Application.InchesToPoints(0.5)
.BottomMargin = Application.InchesToPoints(0.45)
.PrintArea = rng.Address
.HeaderMargin = Application.InchesToPoints(0.25)
.RightFooter = ".Range("A1")
.FitToPagesWide = 1
.CenterHorizontally = True
End With
.PrintPreview
End With
Application.ScreenUpdating = True
End Sub


--


Gary


wrote in message
...
Is there a way to make text that appears in a cell to appear in the
footer? If so, for example, how would I make A1 appear in the
footer? Thanking you in advance.

Michael