Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default Tabbing through unlocked cells

I've create a form and I want to be able to tab through the the unlock cells
in a certain order. Now when I hit the tab key it tabs from left to right by
rows. I want to set the order of the "tabbing" with maybe a macro. Is this
possible?--
Garyw
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Tabbing through unlocked cells

See http://www.xldynamic.com/source/xld.xlFAQ0008.html

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Garyw" wrote in message
...
I've create a form and I want to be able to tab through the the unlock
cells
in a certain order. Now when I hit the tab key it tabs from left to right
by
rows. I want to set the order of the "tabbing" with maybe a macro. Is this
possible?--
Garyw



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Tabbing through unlocked cells

In addition to what you find on Bob's site, here is event code from Anne Troy.

Private Sub Worksheet_Change(ByVal Target As Range)
'Anne Troy's taborder event code
Dim aTabOrd As Variant
Dim i As Long

'Set the tab order of input cells
aTabOrd = Array("A5", "B5", "C5", "A10", "B10", "C10")

'Loop through the array of cell address
For i = LBound(aTabOrd) To UBound(aTabOrd)
'If the cell that's changed is in the array
If aTabOrd(i) = Target.Address(0, 0) Then
'If the cell that's changed is the last in the array
If i = UBound(aTabOrd) Then
'Select first cell in the array
Me.Range(aTabOrd(LBound(aTabOrd))).Select
Else
'Select next cell in the array
Me.Range(aTabOrd(i + 1)).Select
End If
End If
Next i

End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the above into that sheet module.


Gord Dibben MS Excel MVP

On Fri, 30 Mar 2007 08:18:02 -0700, Garyw
wrote:

I've create a form and I want to be able to tab through the the unlock cells
in a certain order. Now when I hit the tab key it tabs from left to right by
rows. I want to set the order of the "tabbing" with maybe a macro. Is this
possible?--
Garyw


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default Tabbing through unlocked cells

I can't get Anne's code to work. I've checked it several times.
--
Garyw


"Gord Dibben" wrote:

In addition to what you find on Bob's site, here is event code from Anne Troy.

Private Sub Worksheet_Change(ByVal Target As Range)
'Anne Troy's taborder event code
Dim aTabOrd As Variant
Dim i As Long

'Set the tab order of input cells
aTabOrd = Array("A5", "B5", "C5", "A10", "B10", "C10")

'Loop through the array of cell address
For i = LBound(aTabOrd) To UBound(aTabOrd)
'If the cell that's changed is in the array
If aTabOrd(i) = Target.Address(0, 0) Then
'If the cell that's changed is the last in the array
If i = UBound(aTabOrd) Then
'Select first cell in the array
Me.Range(aTabOrd(LBound(aTabOrd))).Select
Else
'Select next cell in the array
Me.Range(aTabOrd(i + 1)).Select
End If
End If
Next i

End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the above into that sheet module.


Gord Dibben MS Excel MVP

On Fri, 30 Mar 2007 08:18:02 -0700, Garyw
wrote:

I've create a form and I want to be able to tab through the the unlock cells
in a certain order. Now when I hit the tab key it tabs from left to right by
rows. I want to set the order of the "tabbing" with maybe a macro. Is this
possible?--
Garyw



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Tabbing through unlocked cells

Anne's code will work if you make changes to a cell in that array of addresses.
It work if you're just by tabbing.

(F2 and hitting enter will be enough to fire the change event.)

Garyw wrote:

I can't get Anne's code to work. I've checked it several times.
--
Garyw

"Gord Dibben" wrote:

In addition to what you find on Bob's site, here is event code from Anne Troy.

Private Sub Worksheet_Change(ByVal Target As Range)
'Anne Troy's taborder event code
Dim aTabOrd As Variant
Dim i As Long

'Set the tab order of input cells
aTabOrd = Array("A5", "B5", "C5", "A10", "B10", "C10")

'Loop through the array of cell address
For i = LBound(aTabOrd) To UBound(aTabOrd)
'If the cell that's changed is in the array
If aTabOrd(i) = Target.Address(0, 0) Then
'If the cell that's changed is the last in the array
If i = UBound(aTabOrd) Then
'Select first cell in the array
Me.Range(aTabOrd(LBound(aTabOrd))).Select
Else
'Select next cell in the array
Me.Range(aTabOrd(i + 1)).Select
End If
End If
Next i

End Sub

This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the above into that sheet module.


Gord Dibben MS Excel MVP

On Fri, 30 Mar 2007 08:18:02 -0700, Garyw
wrote:

I've create a form and I want to be able to tab through the the unlock cells
in a certain order. Now when I hit the tab key it tabs from left to right by
rows. I want to set the order of the "tabbing" with maybe a macro. Is this
possible?--
Garyw




--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Tabbing through unlocked cells

Typo probably

It "won't" work if you're just tabbing.


Gord

On Fri, 30 Mar 2007 14:32:22 -0500, Dave Peterson
wrote:

It work if you're just by tabbing.


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default Tabbing through unlocked cells

The code does run if I press F2 and Enter.
I would prefer a one key tab but this will work fine.
Thanks so much for your help.
--
Garyw


"Gord Dibben" wrote:

Typo probably

It "won't" work if you're just tabbing.


Gord

On Fri, 30 Mar 2007 14:32:22 -0500, Dave Peterson
wrote:

It work if you're just by tabbing.



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
paste locked cells and unlocked cells in protected sheet Angeline Excel Worksheet Functions 15 November 1st 06 11:51 PM
Moving from unlocked cells to unlocked cells in an excel form Stacey Lee Excel Worksheet Functions 1 April 24th 06 08:44 PM
Tabbing through Unlocked cells Susan Excel Worksheet Functions 0 March 26th 06 11:51 PM
Tabbing between cells in Excel Stumped Excel Discussion (Misc queries) 3 February 16th 06 02:52 PM
Tabbing to move between cells Cassi Excel Discussion (Misc queries) 1 June 17th 05 10:59 PM


All times are GMT +1. The time now is 06:55 PM.

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

About Us

"It's about Microsoft Excel"