I want to create a button that prints out a range of cells but the range always differs by the number of rows. I thought I could use the Lastrow feature so I do not have the manually tweak the code everytime I need to print. The Range that needs to be printed out is B2:S50 but the row number always changes therefore I thought Lastrow would be useful to save me from manually changing.
I have tried the following code(s):
Sub printproposal()
Sheets("Proposals").Activate
Dim Lastrow As Integer
Lastrow = Range("B" & Rows.Count).End(xlUp).Row
' MsgBox Lastrow
Range(Lastrow, "B"):("S2").Printout
Sheets("Proposals").Range(Cells(Lastrow, "B"),
Cells("S2")).printout
End Sub