Michael M
Well-known Member
- Joined
- Oct 27, 2005
- Messages
- 21,895
- Office Version
- 365
- 2019
- 2013
- 2007
- Platform
- Windows
Hi All
This has got me confused. I'm using a Excel 97-2003 Workbook
I'm using this simple code in my workbook and get an initial Type Mismatch error "13"
On closer inspection I get the error 2042 at the Value in red.
It usually works fine but in this new workbook it errors out in red.
What and why am I getting an error 2042
This has got me confused. I'm using a Excel 97-2003 Workbook
I'm using this simple code in my workbook and get an initial Type Mismatch error "13"
On closer inspection I get the error 2042 at the Value in red.
Rich (BB code):
Sub DELROW()
Dim LR As Long, R As Long
LR = Sheets("PW").Cells(Rows.Count, "H").End(xlUp).Row
For R = LR To 5 Step -1
If Range("A" & R).Value = "" Then 'Value gives Error 2042
Rows(R).EntireRow.Delete
End If
Next R
End Sub
What and why am I getting an error 2042
Last edited: