J
Johanna Gronlund
Hello,
I have a code that hides certain rows in sheets 3 and 4. Is there a way to
make 'Drop Down 3' and 'Drop Down 4' hidden when rows as per Case 2 are
hidden? The code I have so far is below:
Sub ComboBox1_Change()
' Combobox Value Is changed
varData = Range("B27").Value2
' unhide ranges
On Error GoTo 100
Application.ScreenUpdating = False
Sheet3.Range("A58:A68").EntireRow.Hidden = False
Sheet4.Range("A150:A185").EntireRow.Hidden = False
Sheet3.Range("A35:A57, A26").EntireRow.Hidden = False
Sheet4.Range("A12:A148").EntireRow.Hidden = False
Select Case varData
Case 2
Sheet3.Range("A58:A68").EntireRow.Hidden = True
Sheet4.Range("A150:A185").EntireRow.Hidden = True
Case 3
Sheet3.Range("A35:A57, A26").EntireRow.Hidden = True
Sheet4.Range("A12:A148").EntireRow.Hidden = True
End Select
100:
Application.ScreenUpdating = True
End Sub
Many thanks in advance.
I have a code that hides certain rows in sheets 3 and 4. Is there a way to
make 'Drop Down 3' and 'Drop Down 4' hidden when rows as per Case 2 are
hidden? The code I have so far is below:
Sub ComboBox1_Change()
' Combobox Value Is changed
varData = Range("B27").Value2
' unhide ranges
On Error GoTo 100
Application.ScreenUpdating = False
Sheet3.Range("A58:A68").EntireRow.Hidden = False
Sheet4.Range("A150:A185").EntireRow.Hidden = False
Sheet3.Range("A35:A57, A26").EntireRow.Hidden = False
Sheet4.Range("A12:A148").EntireRow.Hidden = False
Select Case varData
Case 2
Sheet3.Range("A58:A68").EntireRow.Hidden = True
Sheet4.Range("A150:A185").EntireRow.Hidden = True
Case 3
Sheet3.Range("A35:A57, A26").EntireRow.Hidden = True
Sheet4.Range("A12:A148").EntireRow.Hidden = True
End Select
100:
Application.ScreenUpdating = True
End Sub
Many thanks in advance.