+ Reply to Thread
Results 1 to 16 of 16

Clicking a link which has no name. IE with VBA

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    17

    Clicking a link which has no name. IE with VBA

    Just wondering if anyone's been able to click a link which as no name?

    I am currently building an automated certificate downloader for various websites (UL, TUV, IMQ, IEC etc). The Excel workbook will have various cells which upon running of code will go out to the various websites, enter cell information into the online forms, submit the information then open the reliant link within the website.

    The problem is that most of these websites have click-able links with no clearly defined attributes except for text relating to different certificate data, Certificate number, Manufacturer, model, etc...

    I have been successful in opening the websites, filling in certain fields within the forms and submitting forms.

    The Element information I've been able to extract from one site (VDE) is as follows, this holds the link to the certificate I wish to proceed to...

    HTML Code: 
    So far I've been able to fill a textbox and click on that but I can't work out how to click on the link then on the next page.

    CODE SO FAR

    ------------------------------working--------------------------------------

    Please Login or Register  to view this content.
    Any help would be greatly appreciated and I look forward to reading some possible solutions

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Clicking a link which has no name. IE with VBA

    If you can get a reference to the link then you can click it.

    Is there no other way to identify it?

    For example via the HREF?

    Or perhaps it's contained within another element or is the child of another element?
    If posting code please use code tags, see here.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Clicking a link which has no name. IE with VBA

    Use this line

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Clicking a link which has no name. IE with VBA

    AB33

    You should check Busy and ReadyState, not just Busy.

  5. #5
    Registered User
    Join Date
    01-23-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Clicking a link which has no name. IE with VBA

    Hi Norie,

    Thanks for the prompt response.

    I can't find any HREF for it at all.

    The full class is as follows;

    HTML Code: 
    Link to table - http://www.vde.com/en/institute/onli...29a7726c860edf

    I think the problem could be resolved by somehow using On-Click but research has gotten me nowhere....

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Clicking a link which has no name. IE with VBA

    Norie,
    Thanks you for spotting!
    I have also found that, there is no tagname called ms-vb2, but it is a class with in a table.

  7. #7
    Registered User
    Join Date
    01-23-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Clicking a link which has no name. IE with VBA

    Hi AB33,

    Thanks too for the help...

    How can I use a class within a table to open the link?

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Clicking a link which has no name. IE with VBA

    As far as I know, the line(tag, ID or class ) should have an anchor.
    <a href/>
    Please Login or Register  to view this content.
    You can use "a" as tagname and if has children, you can loop through.

  9. #9
    Registered User
    Join Date
    01-23-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Clicking a link which has no name. IE with VBA

    Code tried to date none of which wil lopen the link associated with "40000358"

    Please Login or Register  to view this content.

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Clicking a link which has no name. IE with VBA

    What are you actually clicking?

    Is it the entire row?

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Clicking a link which has no name. IE with VBA

    Ohm, I suspect it is a java script link.

    Are you trying to click on this link?




    Certificate no. Company Product First types
    40000358 Xiamen Faratronic Fixed capacitor for electromagnetic interference suppression and connection to the supply mains MKP62

  12. #12
    Registered User
    Join Date
    01-23-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Clicking a link which has no name. IE with VBA

    Clicking anywhere on the row will bring you to the same certificate, however, some entries bring up alot of listings (http://www.vde.com/EN/INSTITUTE/ONLI...3d4db47c259874) I wish to filter through these by using the first cell (which has a number associated with it) and loop through these untill they match one within a workbook cell.

  13. #13
    Registered User
    Join Date
    01-23-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Clicking a link which has no name. IE with VBA

    Hi AB33

    Yes, the first cell within the returned form "40000358" however I wish to match this number first then click on it...

  14. #14
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Clicking a link which has no name. IE with VBA

    I suspect you are trying to get these data

    Certificate no. 40000358


    Product Fixed capacitor for electromagnetic interference suppression and connection to the supply mains
    Product group RFI-suppression capacitors
    Company Xiamen Faratronic
    Co. Ltd.
    99 Xinyuan Road,
    Haicang
    361022 XIAMEN
    Fujian
    CHINA
    Certification mark ENEC Mark and/or VDE Mark


    Type Technical Data
    MKP62 Rated voltage: a)b) AC 275 V oder / or AC 305 V c) AC 275 V order/or AC 305 V order/or AC 310 V


    The problem is none of the innertext are part of the anchor tag. I think the link is javascript.

  15. #15
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Clicking a link which has no name. IE with VBA

    This link work, but I am not sure if this is what you want.

    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    01-23-2014
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Clicking a link which has no name. IE with VBA

    Thanks AB33,

    I'll try this tomorrow morning when I'm back at the desk and report back.

    Thanks again for the help...

+ 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. Display data by clicking the link.
    By shafiqah in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-16-2012, 11:30 AM
  2. Clicking link in IE fails
    By adds007 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-06-2011, 03:25 PM
  3. [SOLVED] Opening a folder by clicking on a link
    By Zee in forum Excel General
    Replies: 1
    Last Post: 08-01-2006, 06:45 AM
  4. Double Clicking on link w/i workbook does't bring me to souce.
    By tfranc in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2006, 08:20 AM
  5. Replies: 2
    Last Post: 04-15-2005, 02:06 PM

Tags for this Thread

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