+ Reply to Thread
Results 1 to 17 of 17

Excel interacting with IE

  1. #1
    Registered User
    Join Date
    01-11-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    15

    Excel interacting with IE

    Hi All

    I am in the middle of writing a macro that interacts with Internet Explorer. I have managed to open IE with a reference number copied from excel. The macro then works in IE with the request and when finished, submits the form. I now want it to return to Excel (without closing IE).
    This is where I'm having trouble, I have tried sendkeys Alt+Tab but would prefer a more foolproof method.

    I have only 1 internet explorer page open, and 1 excel worksheet, is there a way I can activate excel to complete relavent fields, and then activate IE once more to continue on the next request?

    NB - I have also tried Application.Activate but with no luck so far.

    Any help greatly appreciated

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel interacting with IE

    have you tried appactivate?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    01-11-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Excel interacting with IE

    Hi Joseph

    I have briefly, but I am struggling to find how to lable internet explorer to direct the activation?

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel interacting with IE

    I thought you wanted to activate excel? if so
    Please Login or Register  to view this content.
    oughta do it.

  5. #5
    Registered User
    Join Date
    01-11-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Excel interacting with IE

    Sorry, I am after both excel and internet explorer.

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel interacting with IE

    should just be
    Please Login or Register  to view this content.
    for ie

  7. #7
    Registered User
    Join Date
    01-11-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Excel interacting with IE

    Thats what I was hoping but I am getting Run-time error '5', Invalid Procedure call or argument?

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel interacting with IE

    is the title bar caption of your IE session customized?

  9. #9
    Registered User
    Join Date
    01-11-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Excel interacting with IE

    I'm guessing the answer would be yes, the title is "Colleague IT Servicedesk - Microsoft Internet Explorer provided by Lloyds TSB Group"

  10. #10
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel interacting with IE

    have you tried using that as the argument to appactivate, or even just the last part
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    01-11-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Excel interacting with IE

    Yes, I have tried both individually and as one. The same run-time error occurs

  12. #12
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel interacting with IE

    which version of ie are you using?
    Please Login or Register  to view this content.
    works for me with ie9 no matter what the caption says.

  13. #13
    Registered User
    Join Date
    01-11-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Excel interacting with IE

    ie8, sorry, meeting, will be back in 20 minutes. thanks for this

  14. #14
    Registered User
    Join Date
    01-11-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Excel interacting with IE

    Hi

    Sorry about that. I am using Internet Explorer 8. I have just tried writing a test macro merely saying

    Please Login or Register  to view this content.
    I am still getting the error activating IE

  15. #15
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel interacting with IE

    maybe apis will be safer
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    01-11-2012
    Location
    Bristol
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Excel interacting with IE

    I have found the app source file on my machine is not called Internet Explorer as normal, it is packaged as LTSB_Internet_Explorer so have used that as the AppActivate name and it works.
    Thanks very much for your help Joseph

  17. #17
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel interacting with IE

    my pleasure-thanks for letting me know the final solution

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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