AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 1,835
- Office Version
- 2019
- 2016
- Platform
- Windows
Having a bit of trouble... trying
X becomes an unprintable character and last debug.print is 1. Last row is actually 3210.
What am i doing wrong?
VBA Code:
Sub Go()
Dim x As Range
With Worksheets("A")
Debug.Print .Cells(1, "A") 'this works
Set x = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious)
Stop
Debug.Print .Range("A1").CurrentRegion.Rows.Count
End With
End Sub
X becomes an unprintable character and last debug.print is 1. Last row is actually 3210.
What am i doing wrong?