(Solved) – Enable and disable drop down lists

(solved)-–-enable-and-disable-drop-down-lists

Enable and disable drop down lists in Excel using VBA

'Private Sub Worksheet_Change(ByVal Target As Range)
'On Error Resume Next
'If Target.Address <> "$O$5" Then Exit Sub
'Select Case UCase(Target.Value)
'    Case "NO"
'        Application.EnableEvents = False
'        Range("Q5,Q20").ClearContents
'        Range("R5,R20").ClearContents
'    Case "YES"
'        'Range("B28,B32").
'        Application.EnableEvents = True
'End Select
'
'exitHandler:
'  Application.EnableEvents = True
'  Exit Sub
'
'End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)

 If Target.Address = "$O$5" Then
    Target.Range("O5:08").ClearContents = True
    Sheet9.d
 End If


End Sub

I need to be able to enable modified by Author and Modified by User drop down lists (created in excel) when ‘Yes’ is selected in Make a selection drop down list and disable Modified by Author and Modified by User drop down list when No’ is selected using VBA code.I have tried everything but don’t know how to achieve this. There are no forms used in this project. I would appreciate if you could give me an idea how I can do this through VBA code.

Leave a Reply

Your email address will not be published. Required fields are marked *