Data Validation List

howard

Well-known Member
Joined
Jun 26, 2006
Messages
5,633
Office Version
  1. 2019
Platform
  1. Windows
I have se up a data validation list on several sheet and each sheet has the following code


The arrows appears and data validation works when set up, but when I go to any of the sheets, the arrows appears but the drop down arrow does not activate


Code:
 Option Explicit


Private Sub Worksheet_Change(ByVal Target As Range)
Dim col As Long
Dim c As Range

Application.ScreenUpdating = False

    If Target.Address(0, 0) <> "A2" Then Exit Sub
    Columns("B:M").Hidden = False
    Set c = Range("B4:M4").Find(Target, LookIn:=xlValues, LookAt:=xlPart)
    Columns("B:M").Hidden = True

    If Not c Is Nothing Then
    c.EntireColumn.Hidden = False
    Else
    MsgBox Target & " not found", 48, "ERROR"
    End If

Application.ScreenUpdating = True

End Sub


It would be appreciated if someone could assist me
 

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Watch MrExcel Video

Forum statistics

Threads
1,109,029
Messages
5,526,340
Members
409,697
Latest member
christopherlewis1620

This Week's Hot Topics

Top