+ Reply to Thread
Results 1 to 17 of 17

Excel VBA with Internet Explorer (frames within frames?)

  1. #1
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Excel VBA with Internet Explorer (frames within frames?)

    Hello,

    I'm having difficulty trying to get the class id, name id, element id etc on Internet Explorer which I believe is in frames.

    In the Developer Tool, I'm able to search "Monthly Operational Reports" - the 14th branch (See attached).

    However, when I tried to go further down, and that is "sub-branch of the 14th branch", I'm unable to find "Monthly Cost, Revenue and ASR". Not to mention too that I can't find the "leaves" - the 2 reports that I need to run "Outbound" and "Inbound".

    Question now is, how do I go and find these "frames", "element", "tag" etc so that I could have the VBA to "find" and "click" on these to have my report automated?
    Attached Images Attached Images

  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: Excel VBA with Internet Explorer (frames within frames?)

    Have you tried the Select element button in Developer Tools?
    If posting code please use code tags, see here.

  3. #3
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Excel VBA with Internet Explorer (frames within frames?)

    Yes I did.

    In fact, I tried to run the code, and I get errors.

    One of them could be the IE is still running.

    I've attached a print screen of my intranet webpage as well as the "source code". I don't know if this is considered frame.
    Attached Images Attached Images

  4. #4
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Excel VBA with Internet Explorer (frames within frames?)

    I also started working with Iframes and while I do not have the answer I believe this might help if you can locate the HTML URL within the source code for the IFrame itself. For instance the source code looked like this below. It was located within a form inside a <div

    HTML Code: 
    HTML Code: 
    HTML Code: 
    Then I found the IFrame finally

    HTML Code: 
    I simply allowed the macro to navigate to the action which was a URL that was within the IFrame and then I was able to use the F12 developer tools to use the ARROW button function to identify which obeject I was looking for. I hope that helps some.

    The easiest way to find the IFrame if there is one right click view source on the menu bar or the top of the Iframe itself and then within the source code search for the word IFrame. Typically most programmers will use this in their URL, ID, or ACTION, usually. If not best of luck to you because I have not found an easier way yet. See pic for where I right clicked my screen it might help.

    Right click view source.jpg

  5. #5
    Forum Contributor Jack7774's Avatar
    Join Date
    08-31-2012
    Location
    Georgia, US
    MS-Off Ver
    Excel 2010
    Posts
    576

    Re: Excel VBA with Internet Explorer (frames within frames?)

    The "IFrameDailyReport.aspz?view=1" was the directory on the website that I needed to attach to my URL to navigate inside the IFrame if that makes sense.

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

    Re: Excel VBA with Internet Explorer (frames within frames?)

    dluhut

    What code are you referring to?

    By the way, have you considered that the page is dynamic and some of it's content might be being generated dynamically and therefore might no appear when you look in Developer Tools?

  7. #7
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Excel VBA with Internet Explorer (frames within frames?)

    Thanks jessebranum777...but I tried to find it...still couldn't find it.

    Especially the "children" of the branch. I've attached a print screen of the developer (on the 1st post), but i still couldn't find it no matter how I search :'(

  8. #8
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Excel VBA with Internet Explorer (frames within frames?)

    Quote Originally Posted by Norie View Post
    dluhut

    What code are you referring to?

    By the way, have you considered that the page is dynamic and some of it's content might be being generated dynamically and therefore might no appear when you look in Developer Tools?
    I'm sorry for not putting the code...below is part of the code.

    Please Login or Register  to view this content.
    When you say dynamic? What do you mean? Do you mean that the order of "Monthly Operating Report" could move every time it's loaded?

    As far as I can think of, it's not dynamic, since every time I open up, it's always the same place and the same name (see my attached on the 1st thread...the "frame" to the left is always the same).

    What I'm having difficulty is getting to click on my "outbound" and "inbound" link to open up a new "window" (probably another frame). I can't even get "Monthly Cost, Revenue and ASR" I tried to search for it, even using the ARROW, and it doesn't find.

  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: Excel VBA with Internet Explorer (frames within frames?)

    That's not what I mean, I mean the content, ie the data, is dynamically generated, perhaps when you select an option/click a link/button.

  10. #10
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Excel VBA with Internet Explorer (frames within frames?)

    To be honest Norie, I'm new to this, It MAY be dynamic that I don't know...

    Let me walk you through for you to have a better understanding if I were to do it manually.

    A few paragraphs from here is on the 1st thread picture of the print screen
    I'll open up IE and input the URL.
    On the left hand side of the URL, I was given multiple choices. I chose '+' the 14th from the top (Monthly Operational Reports) to expand.
    Once it expand, I'll click on '+' again to expand the "Monthly Cost, Revenue and ASR".
    Once it expand, I'll then click on "George Carrier Balance - Oubound".

    From this point onwards, print screen are not shown
    A new window will pop-up asking me to choose the dates that I want my report to be.
    When I click "ok" the pop-up window that ask me for the dates will close, and given a few seconds, a new pop-up window will open with the results.
    On the same window, I shall then scroll through at the bottom and choose the button that says "excel"
    A new window will open and ask me whether I want to "open", "save" or "cancel"

    I hope you can visualize what I've been saying so far.

    That being said, is this dynamic?

    Note that my trouble is trying to have VBA to find and click on the expands and finally click "George Carrier Balance - Oubound" to have a new window open
    Last edited by dluhut; 04-16-2014 at 03:59 PM.

  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: Excel VBA with Internet Explorer (frames within frames?)

    I have no way of knowing for sure if it's dynamic without being able to access the page but from what you describe it does sound as though something is going on behind the scenes.

    For example it sounds like you have some sort of (dynamic) tree structure on the left hand side of the page.

    Have you tried searching for 'George Carrier Balance - Outbound'?

  12. #12
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Excel VBA with Internet Explorer (frames within frames?)

    Quote Originally Posted by Norie View Post
    I have no way of knowing for sure if it's dynamic without being able to access the page but from what you describe it does sound as though something is going on behind the scenes.

    For example it sounds like you have some sort of (dynamic) tree structure on the left hand side of the page.

    Have you tried searching for 'George Carrier Balance - Outbound'?
    Yes I did. I even try to search for "Monthly Cost, Revenue and ASR" and I can't find it.

    I can only find on the "high level of the branch" such as "Administrative Reports", "Monthly Operational Reports" etc.

  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: Excel VBA with Internet Explorer (frames within frames?)

    Did you try the Select element button I suggested earlier?

  14. #14
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Excel VBA with Internet Explorer (frames within frames?)

    Quote Originally Posted by Norie View Post
    Did you try the Select element button I suggested earlier?
    Yes I did. I click on the "Arrow" or Ctrl + B and then clicking it either on "Monthly Cost, Revenue and ASR" or "George Carrier Balance - Outbound" and still did not find any

  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: Excel VBA with Internet Explorer (frames within frames?)

    What happens if you try it with Monthly Operational Reports?

  16. #16
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Excel VBA with Internet Explorer (frames within frames?)

    I was looking at my senior's work that he left before he left the company. He had a partial code done that was able to get for other reports. In the attached file, it seems that he's able to rename the supposedly "(General)" to other names (in this case ieIXReport - top left red circled). Notice too that on the top right red circled, which used to be "(Declarations)" now is rename to "NewWindow2".

    Anyone knows how to "rename" this?

    Part of the code that he has declare is
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Images Attached Images

  17. #17
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,067

    Re: Excel VBA with Internet Explorer (frames within frames?)

    This is how far I can get so far...And this code is just to click on "Monthly Operation Reports"

    Please Login or Register  to view this content.
    Last edited by dluhut; 04-17-2014 at 10:23 AM.

+ 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] Interaction with VBA Internet Explorer 9 - Error Frames
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-28-2012, 02:38 PM
  2. VBA Internet Explorer Automation using frames
    By kboy1289 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-16-2012, 04:43 PM
  3. Excel 2007 : Creating 'frames' in Excel
    By rachelar in forum Excel General
    Replies: 1
    Last Post: 03-15-2012, 08:18 PM
  4. Excel Frames
    By Barry Clark in forum Excel General
    Replies: 0
    Last Post: 08-23-2006, 04:13 PM
  5. frames in excel?!
    By alphabeta77 in forum Excel General
    Replies: 1
    Last Post: 03-23-2005, 04: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