Barryj
02-13-2015, 07:22 AM
I have a print macro that I am using on another project to detemine the last row of data to print, I now have another project where I need to print to the last row but that last row could be of any four columns.
Columns A, F, K, P have data, they all contain different lenght rows of data and it is different every time the data needs to be printed, how would I go about coding to take the different columns data into consideration so that it prints to the bottom of the column with the most data?
Current print macro
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
.PageSetup.PrintArea = "B1:N" & LastRow
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End With
Thanks
Columns A, F, K, P have data, they all contain different lenght rows of data and it is different every time the data needs to be printed, how would I go about coding to take the different columns data into consideration so that it prints to the bottom of the column with the most data?
Current print macro
Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
.PageSetup.PrintArea = "B1:N" & LastRow
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End With
Thanks