See that 'case 13 or 9, offset' cell piece?In the sheet this is used, that offset (9 or 13 either one) will select a cell that is "locked" when I use tab or enter if a locked cell is in the way of the direction specified above. It will only select 1, and then continue on to the next appropriate 'unlocked' cell afterwards. But the FIRST time it can go down or over to a 'locked' cell from the unlocked cells, it will.Code:Private Sub TempCombo_KeyDown(ByVal _ KeyCode As MSForms.ReturnInteger, _ ByVal Shift As Integer) If KeyCode = vbKeyF And Shift = 2 Then PrintARX1 If KeyCode = vbKeyR And Shift = 2 Then ClearForm Select Case KeyCode Case 9 ActiveCell.Offset(0, 1).Activate Case 13 ActiveCell.Offset(1, 0).Activate Case Else End Select End Sub
Is there a piece of code necessary to force it to always skip 'locked' cells on the sheet, even though those particular cells are set as 'locked' in the format? Something like instead of 'activecell.offset' it should be 'activeUNLOCKEDcell.offset' or something else?
Thanks.




Reply With Quote