Tab key functionality in a protected worksheet
This is some code I found some years back:
Amend as needed and put it into the ThisWorkBook module.
It allows users to select unprotected cells only and works great
with the tab key.
Select UnProtected Cells ONLY
This will prevent users from clicking on protected cells on all
worksheets. Therefore, the warning message will not appear. The code
must be enterred in the ThisWorkbook module.
Note that the EnableSelection property must be reset each time the
workbook is opened as it defaults to xlNoRestrictions. The
worksheet(s)
must first be unprotected to set the EnableSelection property and then
must be protected for it to take effect.
Private Sub Workbook_Open()
Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
WS.Unprotect 'Password:="wxyz"
WS.EnableSelection = xlUnlockedCells
WS.Protect 'Password:="wxyz", UserInterfaceOnly:=True
Next
End Sub
Regards,
Greg Wilson 5/3/03
--
steveB
Remove "AYN" from email to respond
"Lowkey" wrote in message
...
Is there a way to retain the tab key functionality (to tab across cells)
in a
protected worksheet.
|