Oberon70
Board Regular
- Joined
- Jan 21, 2022
- Messages
- 160
- Office Version
- 365
- Platform
- Windows
Hi,
I am a bit confused to why this error is occurring as it was working a few minutes ago.
The error is happening on the below line:
The last row is correct:
Please let me know if you need the rest of the code? to assist? but the other subs in this module are running like I wanted.
I am a bit confused to why this error is occurring as it was working a few minutes ago.
VBA Code:
Sub EditTempTble()
Dim LastCell As String
Dim LastRow As Double
Dim iCntr As Long
LastCell = wsTmpData.Range(FindLast(3)).Address
LastRow = Range(LastCell).Row
For iCntr = LastRow To 1 Step -1
If Trim(Cells(iCntr, 1)) = "" Then
Rows(iCntr).Delete
End If
Next
End Sub
The error is happening on the below line:
VBA Code:
Rows(iCntr).Delete
The last row is correct:
Please let me know if you need the rest of the code? to assist? but the other subs in this module are running like I wanted.