I'd like to adjust the below code to print only the rows needed. I'm wanting the print down to the last row in Column C that contains any data. All of my attempts so far have failed unfortunately. Any help would be much appreciated.
VBA Code:
Sub PrintManualEntry2021()
Application.ScreenUpdating = False
Worksheets("2021").Unprotect
Worksheets("2021").Columns("HT:IA").EntireColumn.Hidden = False
Worksheets("2021").Columns("D:DD").EntireColumn.Hidden = True
Worksheets("2021").Rows("4:4").EntireRow.Hidden = True
Sheets("2021").Range("a1:ia77").PrintPreview
Worksheets("2021").Columns("HT:IA").EntireColumn.Hidden = True
Worksheets("2021").Columns("D:DD").EntireColumn.Hidden = False
Worksheets("2021").Rows("4:4").EntireRow.Hidden = False
Worksheets("2021").Protect
Worksheets("2021").Calculate
End Sub