Forum Discussion

Carl_Stephens's avatar
Carl_Stephens
Copper Contributor
Sep 15, 2020
Solved

VBA code locks out autofilter

Hello People,   The below code runs perfectly, however, the password also locks of the ability to use autofilters after the code has run......can someone kindly advise the code that I need to add s...
  • HansVogelaar's avatar
    Sep 15, 2020

    Carl_Stephens 

    Change

    wsData.Protect ("ML")

    to

    wsData.EnableAutoFilter = True
    wsData.Protect Password:="ML", UserInterfaceOnly:=True

Resources