+ Reply to Thread
Results 1 to 4 of 4

Macro to Autofill Internet Explorer Form

  1. #1
    Registered User
    Join Date
    03-20-2021
    Location
    Canada
    MS-Off Ver
    2020
    Posts
    2

    Macro to Autofill Internet Explorer Form

    Hi Everyone,

    I am new to this forum and to VBA. I am working on a macro to autofill a webpage form in internet explorer but am getting the below error message:

    "Method 'Document' of object 'IWebBrowser2' failed"

    I have looked around for solutions but have not been able to find anything. Below is the code that I have, any help would be much appreciated!

    Please Login or Register  to view this content.

  2. #2
    Banned User!
    Join Date
    01-17-2021
    Location
    Omaha, NE
    MS-Off Ver
    office 2016
    Posts
    211

    Re: Macro to Autofill Internet Explorer Form

    That's because your Internet explorer object was not created from the Microsoft Internet controls library. You need to make that change and the error will go away. Your document variable and your application variable are coming from two different places that's why. Thus they are not compatible with each other

  3. #3
    Registered User
    Join Date
    03-20-2021
    Location
    Canada
    MS-Off Ver
    2020
    Posts
    2

    Re: Macro to Autofill Internet Explorer Form

    Thank you for the reply and for the help. How do I create my Internet Explorer object from the Microsoft Internet Controls Library?

  4. #4
    Banned User!
    Join Date
    01-17-2021
    Location
    Omaha, NE
    MS-Off Ver
    office 2016
    Posts
    211

    Re: Macro to Autofill Internet Explorer Form

    You have to reference that library in the visual basic editor, which I'm sure you know how to get to in excel. I believe that library, as it should, comes by default when you install office of any version because it's been around for quite some time.I think last time I remember seeing it in folder, the address for where library should be is this

    C:\windows\system 32\shdocview.dll

+ 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. VBA code in Excel doesn't recognize form from Internet Explorer
    By rodrigoo in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-26-2017, 10:11 AM
  2. [SOLVED] VBA - Internet Explorer, fill in form and hit enter
    By mrshl9898 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-11-2017, 06:53 AM
  3. macros for copy paste excel data on to Internet explorer form
    By Zuber Ahmed in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-24-2015, 08:09 AM
  4. VB CODES to open internet explorer & fill form automaticlly
    By sheikhmisbah in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-23-2012, 03:55 PM
  5. macro of internet explorer
    By dropshot in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-05-2012, 08:32 PM
  6. Internet Explorer form automation from Excel
    By Julesdude in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-25-2010, 08:04 AM
  7. Using Excel to Complete Form in Internet Explorer
    By ShannonLarson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2007, 09:28 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