VBA to autofilter by hyperlink

Hello, I would really need a helping hand with a VBA code intended to autofilte a target column in a sheet (Sheet2) when the user clicks on different hyperlinked cells, stored in a column on another sheet (Sheet1). I found the VBA below, it activates the hyperlink, but it works only for the first row in the target table. So, no matter what row I click in the column where I have the hyperlinks stored, the filter works only once, for a single value. The values source column may change constantly, so I think the Criteria1 part should require attention here…


Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
    With Selection
        .AutoFilter Field:=1, Criteria1:=ActiveCell.Value
    End With
End Sub

Thank you very much.

By: Aronnie

19 thoughts on “VBA to autofilter by hyperlink

  1. ig

    Have you ever considered about including a little bit more
    than just your articles? I mean, what you say is important and everything.
    Nevertheless just imagine if you added some great pictures or video clips to give your posts more, “pop”!

    Your content is excellent but with images and video
    clips, this website could undeniably be one of the most beneficial in its niche.
    Awesome blog!

  2. coconut oil

    wonderful points altogether, you simply gained a new
    reader. What may you suggest about your put up that you just made a few days in the past?
    Any sure?

  3. ps4 games

    you’re truly a good webmaster. The website loading pace is amazing.
    It seems that you are doing any unique trick.
    Also, The contents are masterpiece. you’ve performed a magnificent job in this matter!

  4. ps4 games

    Everyone loves what you guys are up too. This
    sort of clever work and exposure! Keep up the fantastic
    works guys I’ve added you guys to my blogroll.

  5. Reuben Ram

    Aw, this was a really nice post. In idea I would like to put in writing like this additionally ? taking time and actual effort to make a very good article? but what can I say? I procrastinate alot and by no means seem to get something done.

  6. ps4 games

    You can certainly see your skills in the work you write.
    The sector hopes for even more passionate writers like you who
    are not afraid to mention how they believe. Always follow your heart.

  7. ps4 games

    I’m amazed, I have to admit. Rarely do I encounter a blog that’s
    equally educative and entertaining, and without a doubt, you have hit the nail
    on the head. The problem is something that not enough men and women are
    speaking intelligently about. I’m very happy I stumbled across this in my hunt for something relating to this.

  8. quest bars cheap

    whoah this weblog is fantastic i love reading your posts.
    Keep up the great work! You recognize, lots of people are searching around
    for this information, you can aid them greatly.

  9. tinyurl.com

    We are a bunch of volunteers and starting a
    brand new scheme in our community. Your website offered us with valuable information to work
    on. You have done a formidable job and our entire community might
    be thankful to you.

Comments are closed.