I'm using an Active X combobox ("GLC_Code") to reference a list of staff codes and have assigned a cell ("D1") to match whatever is selected in the combobox. Based on what is in "D1" different columns should hide/unhide. Except they don't....However, if I make a change in the combobox then double click in the (also changed/matching) linked cell and then double click in any other cell then the hiding/unhiding event is triggered, as scripted. I'm pretty sure I'm overlooking something simple but the neurons aren't firing well today. Here is my code:
Option Explicit
Private Sub GLC_Code_Change()
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
If Target.Address = "$D$1" Then
Select Case Target.Value
Case Is = "Designer GLC 1"
Range("B:B").EntireColumn.Hidden = False
Range("C:R").EntireColumn.Hidden = True
Case Is = "Designer GLC 2"
Range("C:C").EntireColumn.Hidden = False
Range("B:B").EntireColumn.Hidden = True
Range("D:R").EntireColumn.Hidden = True
Case Is = "Designer GLC 3"
Range("D:D").EntireColumn.Hidden = False
Range("B:C").EntireColumn.Hidden = True
Range("E:R").EntireColumn.Hidden = True
Case Is = "Designer GLC 4"
Range("E:E").EntireColumn.Hidden = False
Range("B:D").EntireColumn.Hidden = True
Range("F:R").EntireColumn.Hidden = True
End Select
Application.ScreenUpdating = True
End If
End Sub
Also, I tried several configurations to list the series of columns in one line but nothing worked. Suggestions?
Thanks for your help. David
Bookmarks