+ Reply to Thread
Results 1 to 5 of 5

Activating IE to copy and Paste

  1. #1
    Registered User
    Join Date
    07-28-2009
    Location
    Chicago, Il
    MS-Off Ver
    Excel 2007
    Posts
    67

    Activating IE to copy and Paste

    I have a macro set up and what it should do is go to a website copy the web page and paste into cell A1.
    The problem I am having is that it will open the IE, open the Page but will not do the copy paste function can someone tell me what i am doing wrong

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Activating IE to copy and Paste

    Try this. Put the code in a sheet module or the ThisWorkbook module and make sure you follow the comment at the top of the code.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-28-2009
    Location
    Chicago, Il
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Activating IE to copy and Paste

    Chippy,
    thank you very much but I must admit that you are alot further advanced than I am. I have no idea with you have here so I tried to just copy and paste and i keep getting errored out it keeps giving me "User-defined type not defined" and then it goes to 'Private WithEvents IE as Internet explorere"
    I have put this code into Thisworkbook and in Sheet2
    I do appreciate you help with this

  4. #4
    Registered User
    Join Date
    07-28-2009
    Location
    Chicago, Il
    MS-Off Ver
    Excel 2007
    Posts
    67

    Re: Activating IE to copy and Paste

    Ok, sorry about that finally got the references correct. now the problem I am having is that it is going to quick on not letting the page fully load and the page i am actually trying to copy has tables on it and it is only giving me text

    Sorry to be such a newbie pain

  5. #5
    Valued Forum Contributor
    Join Date
    05-21-2009
    Location
    Great Britain
    MS-Off Ver
    Excel 2003
    Posts
    550

    Re: Activating IE to copy and Paste

    Try adding this line after the While .busy .... : Wend loop:
    Please Login or Register  to view this content.
    However, that shouldn't be necessary because the DocumentComplete event handler is fired asynchronously only when the page is completely loaded and initialised, and the main CopyWebPage() routine is waiting for a flag to be set so that it knows that the page has been loaded and copied. DocumentComplete is fired only once, unless the page has frames, in which case it can fire multiple times, which could be what's happening for your page.

    If the extra line above has no effect, post the URL of the page.

+ 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