Guzzlr
Well-known Member
- Joined
- Apr 20, 2009
- Messages
- 982
- Office Version
- 2021
- Platform
- Windows
Hello all
Instead of finding a particular last row with data in a worksheet. I am exprimenting with finding the Last Cell with data over the entire worksheet, reguardless what row it is.
I have:
However, I am getting the below error, and I'm not sure why.
What am I doing wrong?
Thank you for the help
Instead of finding a particular last row with data in a worksheet. I am exprimenting with finding the Last Cell with data over the entire worksheet, reguardless what row it is.
I have:
VBA Code:
'*********** Find Last Cell With Data **************
Dim LastCell As Range
Set LastCell = ActiveSheet.Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
MsgBox = "Last Cell with Data Is " & LastCell
However, I am getting the below error, and I'm not sure why.
What am I doing wrong?
Thank you for the help