+ Reply to Thread
Results 1 to 6 of 6

click hyperlink from td in tr

  1. #1
    Registered User
    Join Date
    03-31-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    57

    click hyperlink from td in tr

    Hello all

    I have the following code and I want to be able to click the hyperlink associated with the td of the webpage. How do I do this?

    Please Login or Register  to view this content.
    Thanks.

    James

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: click hyperlink from td in tr

    Hello Jimbo77,

    The href property belongs to an Anchor object which supports the Click event. You will need to get the anchor object in the table cell (TD) from the innerHTML.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    03-31-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: click hyperlink from td in tr

    Thanks very much for replying Leith. How do I find the innerHTML?

  4. #4
    Registered User
    Join Date
    03-31-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: click hyperlink from td in tr

    Anyone?

  5. #5
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: click hyperlink from td in tr

    Hello James,

    The innerHTML is property of the TD object.
    Please Login or Register  to view this content.
    This will return the HTML code associated with the table cell. This is where is gets tricky finding the object you need. If the Anchor object has an ID property then it is very easy. You can return the object directly...
    Please Login or Register  to view this content.
    If you don't have an ID then I will need to see the HTML code for the cell to help you further.

  6. #6
    Registered User
    Join Date
    03-31-2013
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    57

    Re: click hyperlink from td in tr

    For what it is worth I solved the problem with this bit of code

    Please Login or Register  to view this content.

+ 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. How to Click a Hyperlink on webpage
    By sugaprasad in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-04-2013, 10:10 AM
  2. click on Hyperlink with macro
    By PriyankaGurav in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-06-2013, 04:06 AM
  3. click hyperlink in listview
    By cnimes in forum Excel General
    Replies: 1
    Last Post: 11-07-2012, 10:19 AM
  4. Run Macro on Hyperlink click
    By karmaimages in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2012, 03:15 PM
  5. Checking if last click was a Hyperlink
    By Reporter in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-19-2009, 05:51 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