Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Tabing through cells on a protected worksheet

I haven't been able to find answer, so here goes.

I have a protected sheet with three (3) unlocked cells. As I tab /
Shft-Tab I can move between the three cells.

Question: How do I get the Tab to stop when it gets to the last
unlocked cell? How do I get Shft-tab to stop when it gets to the
first unlocked cell?

When in the last cell, F12 for example, pressing tab takes me back to
B3. How do I get tab to stop once I get to F12, and Shft-tab to stop
once I am at B3?

I have asked the same question worded several different ways to try
and clarify what I am trying to accomplish. Any Ideas?

Thanks in advance,

bnhcomputing

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 611
Default Tabing through cells on a protected worksheet

I don't think you can keep the Tab key from wrapping the cells. If this is an important
issue, you could trap the Tab key with an OnKey in a macro, and do the selection in code.
If there are other sheets involved this will not be trivial, as the trapping wil be in
effects for all sheets in all open workbooks.

A barebones implementation is the following. It's to tab through A1, C1, E1.

Sub Setup() ' run this once
Application.OnKey "{Tab}", "Tabkey"
End Sub

Sub Tabkey()
Select Case (ActiveCell.Address)
Case Is = "$A$1"
Range("C1").Select
Case Is = "$C$1"
Range("E1").Select
Case Is = "$E$1" ' End of line. Do nothing
Case Else
Range("a1").Select ' start at A1
End Select
End Sub

If A1 is active, C1 will be selected. If C1, then E1. Any other cell -- A1. Another
routine would be needed for Shift-Tab. There are other ways to code it, depending on how
many cells are involved, and if there's a pattern.
--
Regards from Virginia Beach,

Earl Kiosterud
www.smokeylake.com

Note: Top-posting has been the norm here.
Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
-----------------------------------------------------------------------
"bnhcomputing" wrote in message
oups.com...
I haven't been able to find answer, so here goes.

I have a protected sheet with three (3) unlocked cells. As I tab /
Shft-Tab I can move between the three cells.

Question: How do I get the Tab to stop when it gets to the last
unlocked cell? How do I get Shft-tab to stop when it gets to the
first unlocked cell?

When in the last cell, F12 for example, pressing tab takes me back to
B3. How do I get tab to stop once I get to F12, and Shft-tab to stop
once I am at B3?

I have asked the same question worded several different ways to try
and clarify what I am trying to accomplish. Any Ideas?

Thanks in advance,

bnhcomputing



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tabing between tables on a single worksheet txjag007 Excel Discussion (Misc queries) 5 September 7th 06 01:38 AM
... After I protected my worksheet, some cells can be changed... Dr. Darrell Setting up and Configuration of Excel 3 February 25th 06 02:23 PM
Copying a worksheet witrh protected cells to a new worksheet John Excel Worksheet Functions 2 February 1st 06 02:19 PM
Can you allow cells to be merged under a protected worksheet? Greg T Excel Discussion (Misc queries) 1 June 22nd 05 11:19 PM
Unprotecting Cells in a Protected Worksheet Mark F Excel Discussion (Misc queries) 2 December 21st 04 11:13 PM


All times are GMT +1. The time now is 04:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"