VBA Excel Internet Explorer Web Scrapper Skipping Code

M Acc

New Member
Joined
Oct 12, 2015
Messages
4
I have an unusual question. I am currently using VBA to web scrape Internet Explorer. For various reasons, I can not give out the code but here is the gist, when I (and my coworker who is working independently) try to execute code, we have noticed that the compiler tends to skip lines of code (as in does not execute). So if I am trying to navigate through a webpage and I put something into the search bar, press enter, navigate to the resulting webpage and then go back, the program may only go back obviously causing problems. Has anyone else had this issue? Does anyone know what the problem is? Thanks, M
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Are you sure code is being skipped?

There's every possibility, especially when automating IE, that code may appear to be being skipped.
 
Upvote 0
I am absolutely certain. In some cases, the Msgbox(Some Comment) code is being skipped. Its actual code, sometimes not even dealing directly with the IE navigation.
 
Upvote 0
To elaborate further, Sleep functions are being skipped, objIEApp GoBack functions are being skipped, lines in For Each for web scrapping each element are being skipped. This is not just happening with me. My coworkers are having very much the same issues so its not my particular code or computer. I don't know the root cause of this or why the compiler is choosing to skip. This has never happened to me before in VBA and I've been doing it for years now. Only since I've been grabbing IE instances to do web scraping. Has anyone else ever run into this issue?
 
Upvote 0
To elaborate further, Sleep functions are being skipped, objIEApp GoBack functions are being skipped, lines in For Each for web scrapping each element are being skipped. This is not just happening with me. My coworkers are having very much the same issues so its not my particular code or computer. I don't know the root cause of this or why the compiler is choosing to skip. This has never happened to me before in VBA and I've been doing it for years now. Only since I've been grabbing IE instances to do web scraping. Has anyone else ever run into this issue?


Is the data you are getting from the website created by javascript and can the data change dynamically within the IE?
 
Upvote 0

Forum statistics

Threads
1,215,427
Messages
6,124,831
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top