ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SpecialCells(xlCellTypeLastCell) (https://www.excelbanter.com/excel-programming/304586-re-specialcells-xlcelltypelastcell.html)

Tom Ogilvy

SpecialCells(xlCellTypeLastCell)
 
Dim rng as Range
With Worksheets("Sheet1")
set rng = .Cells.SpecialCells(xlCellTypeLastCell)
End With

Shouldn't select anything

--
Regards,
Tom Ogilvy

"Kevin McCartney" wrote in
message ...
How do I get the last edit cell of a sheet without using

application.Cells.SpecialCells(xlCellTypeLastCell) because this causes the
application to select the last cell and hence restarts the
SheetSelectionChange event or alternatively how do find the last cell of a
pivot table?

TIA
KM





All times are GMT +1. The time now is 11:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com