View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default how do I put my unprotected cells in order to answer they're mixed

Penny,
Excel doesn't jump around, it would follow the setting of
ToolsOptionsEditMove Selection after enter, within the unlocked cells.
Maybe changing that will give you the correct order.
If you really want to jump around in an essentially random order, set the ID
of each unlocked cell before protecting the sheet to point to the next cell.
You only need to do this once. AFAIK there's no way to set this without
code. This means you cannot use the sheet with cell IDs for a web page, but
may not be a problem.
You should add error trapping .

Dim PrevRange As Range

Private Sub CommandButton1_Click()
Range("C3").ID = "F9"
Range("F9").ID = "D5"
Range("D5").ID = "E3"
Range("E3").ID = "C8"
Range("C8").ID = "C3"
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

If Not PrevRange Is Nothing Then
Application.EnableEvents = False
Range(PrevRange.ID).Select
Application.EnableEvents = True
End If

Set PrevRange = ActiveCell

End Sub

NickHK

"Penny" wrote in message
...
I have created a form and unlocked certain cells. I want my users to
progress through my form in a certain order, but when I protect the page

and
push the enter button it jump around in what ever order excel wants.

Help!!!
I know there is a way to order them but forget how to do it.