+ Reply to Thread
Results 1 to 2 of 2

Worksheet_FollowHyperlink - specific column only?

  1. #1
    Forum Contributor NewYears1978's Avatar
    Join Date
    03-15-2010
    Location
    Forney, TX
    MS-Off Ver
    Excel 2016
    Posts
    962

    Worksheet_FollowHyperlink - specific column only?

    With Worksheet_HyperlinkFollow is it possible to specify only specific column.

    I have this code that bypass an Excel bug when following hyperlinks that require a logged in website (cookie issue bug in Excel MS never fixed)

    Please Login or Register  to view this content.
    Basically I want to use the code for two different columns so they would each have a different URLs set in the strAddress variable. Is there a way to say only if column U was clicked to set the strAddress?
    I would then set one for column U and one for column W and have the URL int he strAddress different in each. Is probably simple but I am striking out.

    Second part of the question - is it possible to change this formula to work in vba (would be copied down so has to retain copy down values not static cell values)
    Please Login or Register  to view this content.
    I know how to reference a cell with offset but it's the RIGHT LEN SEARCH part I don't know how to do in VBA (if possible).
    Last edited by NewYears1978; 06-13-2022 at 01:49 PM.

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Worksheet_FollowHyperlink - specific column only?

    You can simply check the objLink.Range address to see which column contains the clicked hyperlink. However, it is already navigating to the link before the event fires.

    A workaround - edit a hyperlink so it refers to a 'Place in this document', add the address of the cell which contains the hyperlink to the Cell reference box and add a description as the cell value.

    Basically what you are doing is defining a hyperlink to the cell containing the hyperlink - pointless, maybe, but nothing happens immediately except the Worksheet_FollowHyperlink will fire. In the event handler, check the text in the hyperlink cell and then use Workbook/Worksheet.FollowHyperlink to open the 'real' webpage.
    Please Login or Register  to view this content.
    Silly? Maybe, but if you want to 'pre-process' a hyperlink before navigating to where-ever, it's the easiest way to do it.
    Last edited by cytop; 06-13-2022 at 03:01 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Countif on a Specific Column Header versus a specific Column
    By usc1382 in forum Excel General
    Replies: 7
    Last Post: 07-14-2020, 02:41 AM
  2. [SOLVED] Worksheet_FollowHyperlink(ByVal Target As Hyperlink) Error
    By strud in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-21-2014, 05:47 AM
  3. [SOLVED] Copy rows with specific text in specific column into specific sheet
    By Valemaar in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-22-2014, 03:23 PM
  4. Replies: 5
    Last Post: 12-18-2013, 10:33 PM
  5. Replies: 2
    Last Post: 12-17-2013, 06:30 AM
  6. Extract specific column data from specific sheet from multiple files in a folder
    By piggyfox in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-31-2013, 11:51 AM
  7. Worksheet_FollowHyperlink
    By NamssoB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-31-2005, 10:05 AM

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