View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
scott scott is offline
external usenet poster
 
Posts: 577
Default Determining last active cell in a protected worksheet

Have you tried ctrl-end? Unless you're doing it through VBA. Then you can
always try
myLastRow = _
.Cells.Find("*", After:=.Cells(1), _
LookIn:=xlFormulas, LookAt:=xlWhole, _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByRows).Row
myLastCol = _
.Cells.Find("*", After:=.Cells(1), _
LookIn:=xlFormulas, LookAt:=xlWhole, _
SearchDirection:=xlPrevious, _
SearchOrder:=xlByColumns).Column

cheers,

Scott
"Paul" wrote:

I need to ascertain the last used cell (actually the last used row and the
last used column) in a protected worksheet.

I have tried specialcells(xlLastCell) but this fails when the sheet is
protected.

Any help appreciated