View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default Tabbing through Protected Sheet

Here is one way...

On another sheet (could be hidden), create a table of your from/to cell
addresses. For example, I put the following in A1:B6 of Sheet2:

A3 C3
C3 B3
B3 A15
A15 C15
C15 B15
B15 A3

In a VBA module, add the following macro:

Sub NextCell()
Dim CurrAddr As String, NewAddr
Dim LkupRng As Range
On Error GoTo NCerr
CurrAddr = ActiveCell.Address(RowAbsolute:=False, ColumnAbsolute:=False)
Set LkupRng = Sheets("Sheet2").Range("A:B")
NewAddr = Application.WorksheetFunction.VLookup(CurrAddr, LkupRng, 2, False)
If IsError(NewAddr) Then Exit Sub
If ActiveSheet.Range(NewAddr).Locked = True Then Exit Sub
ActiveSheet.Range(NewAddr).Activate
Set LkupRng = Nothing
Exit Sub
NCerr:
MsgBox Err.Description, vbExclamation, "NextCell"
End Sub

You can assign a keystroke combination to the macro or attach it to a button
on the worksheet or a toolbar.

If you are new to macros, this link to Jon Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"CONFUSED AT WORK" wrote:

Just windering if there is a way to tab through a locked sheet. I have many
unlocked cells, that i need access to, but the problem is I need them in a
specific order, for example, right now its,

a1 - tab b1 tab c1

Where i Need it a1 tab c3 tab b2

Didnt know if there was a way or not.


THanks.