I have the below code within the worksheet of my workbook. It allows users to select more than one option from a drop-down menu within one cell. The code works excellent for that, but when I protect the sheet the multiple selection ability is removed and I am not sure why.
Private Sub Worksheet_Change(ByVal Target As Range) Dim rngDV As Range Dim oldVal As String Dim newVal As String Dim isect As Range If Target.Count > 1 Then GoTo exitHandler On Error Resume Next Set rngDV = Cells.SpecialCells(xlCellTypeAllValidation) On Error GoTo exitHandler If rngDV Is Nothing Then GoTo exitHandler If Intersect(Target, rngDV) Is Nothing Then Else Application.EnableEvents = False newVal = Target.Value Application.Undo oldVal = Target.Value Target.Value = newVal If oldVal = "" Then Else If newVal = "" Then Else Target.Value = oldVal & " | " & newVal End If End If End If exitHandler: Application.EnableEvents = True End Sub
Does anyone know how I can protect the worksheet and still have the multiple selection ability work? Any and all help would be greatly appreciated.