• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

web scrapping help - giving run time error 13 - type mismatch

Hi Team

I have written a code which is working fine on my laptop. But when i am sending this to other regions to work, it is showing error "TYPE MISMATCH 13 RUN TIME ERROR" at set doc = ie.document.

Please help me, what to do next to solve this problem?

Thanks
RatanB
 

Attachments

  • RAP08 - OneList Links Crawler.xlsm
    45.8 KB · Views: 7
Hi Team

I have written a code which is working fine on my laptop. But when i am sending this to other regions to work, it is showing error "TYPE MISMATCH 13 RUN TIME ERROR" at set doc = ie.document.

Please help me, what to do next to solve this problem?

Thanks
RatanB
Vba code Password...
 
Likely due to missing reference library in user environment. I can't test further as I can't access site.

Test and see if any users are missing Microsoft HTML Object Library, Microsoft Internet Controls, or Windows Script Host Object Model (they should have it, but depending on installation/set up, may not be in usual location and may cause issue).

In most cases, unless you know for sure that users have these libraries, it's safer to use late binding and remove references except for standard set for Excel.

Also, you can try Dim doc as IHTMLDocument instead of HTMLDocument.

Edit: As general practice, I use References & Early binding when I'm writing codes. To make use of intellisense. But switch to late binding and remove references before release.
 
Last edited:

I have tried dim ihtmldocument but not working.

all required references library also selected. but not working.

in my laptop, program is working. but when i am giving it to user, they are unable to do so and the program is stucked at set doc = ie.document.

when i am trying msgbox typename(ie.document) it is returning HTMLDocument but when i am setting an object for this it is not able to do so...

I dont understand what I am suppose to do..

please help :(
 
As stated, user's computer may have unusual path and/or registry. Try late binding and see if it works.
 
I dont know actually why it is happening.. but what i did is i made the program again in different workbook in the system where it was giving error.
And it works there now.. and working on my PC also..

I dont know whats wrong with the code or system config.

Thanks all for the support.

Make me understand what could be the reason.

Thanks and Cheers.
 
Back
Top