Hello,
I am trying to use the 'Worksheet_Change' sub routine twice. From what I understand the sub routine itself can only be used once so I need to merge my code into the one which is where I am having the trouble.
The first part works by itself and changes the case from lower case to upper case;
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("H2:I100")) Is Nothing Or Target.Cells.Count > 1 Then Exit Sub
Application.EnableEvents = False
'Set the values to be uppercase
Target.Value = UCase(Target.Value)
End Sub
The second part I cannot get the coding correct and also having problems merging it into the 'Worksheet_Change' sub routine.
What I want to do is look at the current cell, which is a drop-down, and depending on the cell contents I want to protect / lock several other cells. The code I currently have is;
If ActiveCell <> "" Or ActiveCell <> "S.Triage Ticket" Then
cell.Offset(0, 2).Locked = True
cell.Offset(0, 3).Locked = True
cell.Offset(0, 4).Locked = True
cell.Offset(0, 5).Locked = True
cell.Offset(0, 6).Locked = True
End If
Please can I have help on the second part of the code and help merging it into the 'Worksheet_Change' sub routine.
Bookmarks