PDA

View Full Version : Using a repeating bottom row as a footer



mzsuga
07-27-2009, 11:00 AM
I want my footer to be more than the max characters so I set it to as the last row of my sheet. But the italicize portion is not working, and hiding the last row is not working. Please help.


Sub footer()

n = Cells(Rows.Count, "e").End(xlUp).Row + 1
Cells(n, "A").Value = String$(300,"X")
Cells(n, "A").Font.Italic = True
Cells(n, "b").Value = "column b"
Dim StrFtr As String, Rng As Range, Sh As Worksheet, c As Range
Set Sh = Worksheets("summary")
Set Rng = Sh.Range(Cells(n, "a") & Sh.Cells(n, "b"))

For Each c In Rng
StrFtr = StrFtr & c & " "
Next c

ActiveSheet.PageSetup.LeftFooter = StrFtr

Cells(n, "A").EntireRow.Hide = True
End Sub


Post Edited for readability Aug 14th 2009 12:04 PM
~Oorang

Oorang
08-14-2009, 09:12 AM
Hello,
I'm not sure I understand what you are trying to do here, but Italicization seems to be working fine for me. To hide the last row, you just do this:
Set ws = Excel.ActiveSheet
ws.Rows(ws.UsedRange.Rows.Count).Hidden = True
But if you try to put the cell value into the footer, it's value will still be truncated.