Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determining last active cell in a protected worksheet
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determining last active cell in a protected worksheet
Scott
Many thanks - the only thing I had to change was .cells. to just cells. And yes, I am trying to do this with VBA. Paul "Scott" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I have formatting toolbar active for the unprotected(unlocked) cells of the protected worksheet??? | Excel Discussion (Misc queries) | |||
Is the active worksheet protected? | Excel Programming | |||
Determining active conditional format of one cell | Excel Programming | |||
Determining Active Row Number | Excel Programming | |||
Determining Active Row Number | Excel Programming |