+ Reply to Thread
Results 1 to 1 of 1

Hide some of the Autofilter arrows using VBA

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    Guildford, England
    MS-Off Ver
    Excel 2003
    Posts
    7

    Hide some of the Autofilter arrows using VBA

    Some advise on the best way to hide Autofilter arrows for several columns is needed!
    Sorry if any of this has been resolved before, but I haven’t been able to find something that works for me (i.e. I have found some codes, but some I could not get to work).

    I have included a sample sheet that mimics the setup of my file. I am using Excel 2003.

    I want to be able to only show Autofilter arrows for columns B, C, D and I
    I have created a module with the following macro:

    Sub Hide_Dropdown()
    With Range("A8:N8")
    .Autofilter field:=1, Visibledropdown:=False
    .Autofilter field:=2, Visibledropdown:=True
    .Autofilter field:=3, Visibledropdown:=True
    .Autofilter field:=4, Visibledropdown:=True
    .Autofilter field:=5, Visibledropdown:=False
    .Autofilter field:=6, Visibledropdown:=False
    .Autofilter field:=7, Visibledropdown:=False
    .Autofilter field:=8, Visibledropdown:=False
    .Autofilter field:=9, Visibledropdown:=True
    .Autofilter field:=10, Visibledropdown:=False
    .Autofilter field:=11, Visibledropdown:=False
    .Autofilter field:=12, Visibledropdown:=False
    .Autofilter field:=13, Visibledropdown:=False
    .Autofilter field:=14, Visibledropdown:=False
    End With
    End Sub

    Is this the best thing? It means I have to run the macro for all sheets, which I don’t mind doing, as long as it remains like this when I share the spread sheet and others open it. I have not had it confirmed whether this is indeed the case by other users - if it is then it is probably fine to leave this as it is.
    Or is it better to have a macro like this that runs automatically when the worksheet is accessed?

    The worksheet is protected with p/w “test”

    Thanks
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1