Tabbing in a form from field to field

  • Thread starter Thread starter Tom S.
  • Start date Start date
T

Tom S.

I've set up a form. I want to tab from data input cell
to data input cell. The cells are not right together. I
can do this in 2002 by protecting/locking all the non-
data cells; then, the tab (or cursor) moves to the next
unprotected cell.
But I want to use this in prior versions of Excel. It
seems that in those versions (2000, 97), the cursor or
tab will go to protected cells, but the paper clip opens
up and tells me that the cell is protected. How can I
just tab to the next cell?
 
Hi Tom

You can protect your sheets with code like this
You can only select cells with locked =false now


Right click on the Excel icon next to File in the menubar
And choose View code

You are now in the Thisworkbook module
Paste the Event in this place
Alt-Q to go back to Excel
Save your file and close it

When you open the file again you can only select unprotected cells

Private Sub Workbook_Open()
Dim Sh As Worksheet
Application.ScreenUpdating = False
For Each Sh In ThisWorkbook.Worksheets
Sh.Select
Sh.Protect userinterfaceonly:=True
Sh.EnableSelection = xlUnlockedCells
Next
Sheets(1).Select
Application.ScreenUpdating = True
End Sub
 
Back
Top