Moving within a form
'try Anne Troy's taborder event code it may do what you you require.
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", "D5", "C5", "A10", "D10", "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
Right-click on the sheet tab and "View Code". Copy/paste the code into that
sheet module. Adjust the aTabOrd Array to suit your need.
Alt + q to go back to the Excel window.
Enter data in A5 press Enter & you will be taken to the next cell.in the
aTabOrd
Hope useful
credit to Anne Troy.
--
jb
"Cindi" wrote:
I am trying to creat a form so that when the person filling it out completes
a cell, I can direct which cell they go to next. Is that possible?
I have locked the cells they cannot change, but tabbing through it, I get
stuck in a circle in a couple of places.
|