enfantter
11-22-2007, 12:57 AM
Hey once again all,
Just encountered yet another problem.
Im runing a macro where i want to set the printing area as all the used columns "A:L" and the rows "9:[lastrow]".
My code is like this:
Dim y As Long, lastCell2 As range
y = ActiveSheet.UsedRange.Rows.Count
Set lastCell2 = Cells.SpecialCells(xlCellTypeLastCell)
ActiveSheet.PageSetup.PrintArea = range(Cells(9, 1), lastCell2).Address
but Im guessing that im missing the point here ...
Anyone can help?!
Just encountered yet another problem.
Im runing a macro where i want to set the printing area as all the used columns "A:L" and the rows "9:[lastrow]".
My code is like this:
Dim y As Long, lastCell2 As range
y = ActiveSheet.UsedRange.Rows.Count
Set lastCell2 = Cells.SpecialCells(xlCellTypeLastCell)
ActiveSheet.PageSetup.PrintArea = range(Cells(9, 1), lastCell2).Address
but Im guessing that im missing the point here ...
Anyone can help?!