Ctrl+End with VBA
Hi Dave B,
how do I find the last cell in the used range using VBA)?
Try:
Dim rng As Range
Set rng = Cells.SpecialCells(xlCellTypeLastCell)
Note that the last cell in the used range may not be populated.
---
Regards,
Norman
"Dave B" wrote in message
...
How can I use VBA to find out which cell Excel would move to if I pressed
Ctrl+End (i.e. how do I find the last cell in the used range using VBA)?
Thanks.
|