Changing tab order of locked worksheet cells

P

PO

Hi,

Is there any way to change the tab order when tabbing between locked cells
in a protected worksheet - through script or otherwise?

Regards
Pete
 
J

John Bundy

You can do it through code, though it won't be easy. Put this in the sheet
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Call test
End Sub

and this in a module
Declare Function GetKeyState Lib "user32" _
(ByVal nVirtKey As Long) As Integer

Const VK_CONTROL As Integer = &H11 'Ctrl


Sub test()
If GetKeyState(vbKeyTab) < 0 Then Ctrl = True Else Ctrl = False
If Ctrl = True Then
Cells(1, 1).Select

End If
End Sub

this selects just one cell, you can integrate a counter or another method to
decide where to move to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top