Hi,
I am working to create a pretty simple macro setup that when you change a drop down it uses the entry in that field to either hide or unhide a set of rows. I do it with two macros below
The code itself works fine except for one component. It makes it so that the drop down list can no longer be selected and users cant change the value in that drop down list.
Does anyone know of a way around this? I tried a Wait (As you will see in the code) but it just held with the button selected already and still unable to change.
I am working to create a pretty simple macro setup that when you change a drop down it uses the entry in that field to either hide or unhide a set of rows. I do it with two macros below
The code itself works fine except for one component. It makes it so that the drop down list can no longer be selected and users cant change the value in that drop down list.
Does anyone know of a way around this? I tried a Wait (As you will see in the code) but it just held with the button selected already and still unable to change.
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("D8")) Is Nothing Then
'Application.Wait (Now + TimeValue("0:00:10"))
Select Case Range("D8")
Case "Cash in Hand": NTB_Hidden
Case "ONLY paying off additional debt": NTB_Hidden
Case "(Select)": NTB_Hidden
End Select
End If
End Sub
VBA Code:
Sub NTB_Hidden()
Application.ScreenUpdating = False
On Error Resume Next
With ActiveSheet
.Unprotect ("8675309")
Rows("25:46").Select
If Range("D8").Value = Range("P4").Value Then
Selection.EntireRow.Hidden = False
Else
Selection.EntireRow.Hidden = True
End If
.Protect ("8675309")
Application.ScreenUpdating = True
End With
End Sub