+ Reply to Thread
Results 1 to 16 of 16

Macro to click on tab link within website

  1. #1
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Macro to click on tab link within website

    My code below opens up a webpage inputs a search data that it pulls form cell "B2" then clicks on the submit button. The next page opens up and their are multiple tabs on the top of the screen. I simply want to change to another tab. I want to navigate to the "Map" tab as is indicated in my jpeg. My code works fine up to the point of changing tabs. I have tried using the ID but that is not working.
    The debugger keeps stoping on this line:
    Please Login or Register  to view this content.
    Does anyone know what I am doing wrong?

    Maptab(1).jpgMap tab(Chrome).jpgMap tab(IE).jpg



    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Macro to click on tab link within website


    Check the URL !

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

    Re: Macro to click on tab link within website

    I think logging in is required to reach the page you are interested in.

    By the way, are you sure you are highlighting the correct code in the Develepor?
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Re: Macro to click on tab link within website

    Thanks for your reply. This is a secured website and the URL does not change when I click on the "Map" tab. And yes, I am highlighting the correct code. The ID name seems to match as well but its not working. Any ideas?

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

    Re: Macro to click on tab link within website

    Have you tried navigating to this URL?
    HTML Code: 
    That's the base URL followed by the URL in the onClick event of the Map tab.

  6. #6
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Re: Macro to click on tab link within website

    I get "404-File or directory not found"

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

    Re: Macro to click on tab link within website

    When you manually click the Map tab what URL do you see in the address bar?

  8. #8
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Re: Macro to click on tab link within website

    HTML Code: 

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

    Re: Macro to click on tab link within website

    What error, if any, are you getting on this line of code?
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Re: Macro to click on tab link within website

    "Object variable or With block variable not set"

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

    Re: Macro to click on tab link within website

    Does this work?
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Re: Macro to click on tab link within website

    No, I have tried that one. That's part of my frustration. I get the same error.

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

    Re: Macro to click on tab link within website

    I can't think of anything else I'm afraid.

  14. #14
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Re: Macro to click on tab link within website

    Ok, I appreciate your help. Is it possible that the website developer is masking it somehow?

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

    Re: Macro to click on tab link within website

    Actually, when you hover over the tab what address do you see in the status bar?

    Is it just this again?
    HTML Code: 

  16. #16
    Forum Contributor
    Join Date
    04-30-2013
    Location
    arizona
    MS-Off Ver
    365
    Posts
    147

    Re: Macro to click on tab link within website

    It does not show an address when I hover over but if I right click on the Map tab and select properties the URL address listed is the same. I have uploaded a screen shot of the properties.Properties.jpg

+ 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. Macro to click on link within a website
    By glide2131 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-15-2014, 10:58 PM
  2. VBA (Excel) code to click button on website
    By SteveCole in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2013, 05:05 AM
  3. To Click on log in button of a website
    By sushil10s in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 01:20 AM
  4. VBA that will point or click on a certain part of a website
    By belle08 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-22-2012, 05:26 PM
  5. Click button on website from VBA
    By davegugg in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-12-2009, 05:25 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