Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
PO PO is offline
external usenet poster
 
Posts: 66
Default Changing tab order of locked worksheet cells

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default Changing tab order of locked worksheet cells

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
PO PO is offline
external usenet poster
 
Posts: 66
Default Changing tab order of locked worksheet cells

Thanks John! This was exactly what I was looking for.

Regards
Pete


"John Bundy" (remove) skrev i meddelandet
...
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
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
Locked worksheet & hyperlinks (w/ select locked cells unchecked) dgold82 Excel Discussion (Misc queries) 1 July 10th 09 09:42 PM
protect formulas in locked cells from changing if data is moved Cleve Excel Discussion (Misc queries) 3 July 24th 08 03:12 PM
Strange error when changing locked status of cells [email protected] Excel Programming 4 July 3rd 08 06:36 PM
Changing the locked propery of merged cells. The Wonder Thing[_3_] Excel Programming 1 October 26th 04 09:08 PM
Changing Data order in Cells Adam Morgan Excel Programming 2 November 1st 03 03:28 AM


All times are GMT +1. The time now is 08:02 PM.

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"