+ Reply to Thread
Results 1 to 8 of 8

Filter Table using Click event or Hyperlink

  1. #1
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Filter Table using Click event or Hyperlink

    Hello,

    Im not sure if this is possible, but I have a workbook with 2 sheets, one a summary and the other the data.

    The Summary is the supplier with values beside it and the data is supplier and item code.

    What I would like to do is have it so that when someone clicks on the supplier name it will take them to the data sheet so that they can view that suppliers entire list of products.

    I was just going to set this up using labels and change the code for each individual supplier, but there is alot of them.

    Here is how I got on so far...pretty basic I know

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Filter Table using Click event or Hyperlink

    could you attache any dummy data ?
    Best Regards
    MaczaQ
    ---------------------------------------------------------------------------------------------------------------------------
    If you are satisfied with the solution(s) provided, please mark your thread as Solved
    If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
    - This way you will add him some reputation points ... thanks in advance.

  3. #3
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Filter Table using Click event or Hyperlink

    Hello,

    Ive attached a sample file, What im filtering to is the supref.

    So using the double click event, Ive used this method

    Please Login or Register  to view this content.

    But at Range("A1").Select I get a 1004 Run time error - select method of range class failed.

    If I put that into a normal macro and not a click event it works fine


    Test 27.04.12.xlsx

  4. #4
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Filter Table using Click event or Hyperlink

    because if you are in "A1" then you can not use this line
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Filter Table using Click event or Hyperlink

    Hi MaczaQ,

    Thanks for the reply, but that wasnt my problem - the issue is further down in the code.

    So what Im doing is double clicking Cell E,6 on the 'Summary' sheet

    What I want this to do is copy cell D,6, Paste it into 'Variables' sheet A,1, then the filter on the 'Cannock Stock' Sheet to apply to the contents of the cell I just pasted into.

    But in practice, when I double click Cell E,6 - it selects D,6 and Copies it, then it selects the 'variables' sheet, but then will not select Cell A,1 or any other cell for that matter. And its at this point that I get the runtime error "1004 Run time error - select method of range class failed."

  6. #6
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Filter Table using Click event or Hyperlink

    Hello,

    Can anyone help with this one please?

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Filter Table using Click event or Hyperlink

    Hi kenny
    This works for me
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  8. #8
    Registered User
    Join Date
    03-13-2012
    Location
    Stafford, England
    MS-Off Ver
    Excel 2007
    Posts
    87

    Re: Filter Table using Click event or Hyperlink

    Thank you very much, works a charm

+ 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