PC Review


Reply
Thread Tools Rate Thread

Changing tab order of locked worksheet cells

 
 
PO
Guest
Posts: n/a
 
      25th Nov 2008
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


 
Reply With Quote
 
 
 
 
John Bundy
Guest
Posts: n/a
 
      25th Nov 2008
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.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"PO" wrote:

> 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
>
>
>

 
Reply With Quote
 
PO
Guest
Posts: n/a
 
      26th Nov 2008
Thanks John! This was exactly what I was looking for.

Regards
Pete


"John Bundy" <(E-Mail Removed)(remove)> skrev i meddelandet
news:50DB3603-D3E9-4633-893E-(E-Mail Removed)...
> 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.
> --
> -John
> Please rate when your question is answered to help us and others know what
> is helpful.
>
>
> "PO" wrote:
>
>> 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
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Allowing row deletion in worksheet with locked cells MT Microsoft Excel Misc 2 16th Jul 2009 04:06 AM
Locked worksheet & hyperlinks (w/ select locked cells unchecked) dgold82 Microsoft Excel Misc 1 10th Jul 2009 09:42 PM
Re: What to do if the worksheet is locked on selecting rows or cells? Ildhund Microsoft Excel Misc 0 10th Jan 2007 01:45 PM
Across a worksheet, which cells I have formatted as locked? =?Utf-8?B?Wk0=?= Microsoft Excel Worksheet Functions 3 27th Oct 2005 01:34 PM
I want in one worksheet to relatively link to/reference cells in another without changing the format of the current worksheet. aaron_j_adams@hotmail.com Microsoft Excel Misc 0 22nd Sep 2005 04:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:48 AM.