Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the last row in Excel
Message
 
To
22/10/1999 19:52:14
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00277911
Message ID:
00280357
Views:
17
>What I endup doing was the following:
>Range("A1").select
>on error resume next
>lRealLastRow = cells.find("*",Range("A1"),xlformulas,,xlbyrows,xlprevious).row
>
>The above returns the last row used by the worksheet.
>
>But in VBA code do you know (from excel) how to find the active cell?
>John

Well if you record a macro and clip it, it might look like this. . .

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 10/22/99 by John Harvey
'

'
Selection.SpecialCells(xlCellTypeLastCell).Select
End Sub

Edit, goto, special, last cell.
John Harvey
Shelbynet.com

"I'm addicted to placebos. I could quit, but it wouldn't matter." Stephen Wright
Previous
Reply
Map
View

Click here to load this message in the networking platform