Pat_The_Bat
Board Regular
- Joined
- Jul 12, 2018
- Messages
- 83
Trying to create a range variable that will be the next available cell in the column (after the last used cell in that column, or just below the last used cell in that column)
When I step through the code, I get an error on the line of code that begins "Set LSTROW= ....."
Can anyone help me get un-stuck on this?
Sub LSTROW()
Dim LSTROW As Range
Set LSTROW = Worksheets("Doc Checklist").Range("C2").End(xlDown).Row + 1
With Sheets("Doc Request").Range("B17:B100").SpecialCells(xlConstants)
.Offset(, -1).Copy LSTROW
'The line above this needs to reference range = the next available cell in the column C
End With
On Error Resume Next
Sheets("Doc Checklist").Range("C2:C100").SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub
When I step through the code, I get an error on the line of code that begins "Set LSTROW= ....."
Can anyone help me get un-stuck on this?
Sub LSTROW()
Dim LSTROW As Range
Set LSTROW = Worksheets("Doc Checklist").Range("C2").End(xlDown).Row + 1
With Sheets("Doc Request").Range("B17:B100").SpecialCells(xlConstants)
.Offset(, -1).Copy LSTROW
'The line above this needs to reference range = the next available cell in the column C
End With
On Error Resume Next
Sheets("Doc Checklist").Range("C2:C100").SpecialCells(xlBlanks).EntireRow.Delete
On Error GoTo 0
End Sub