Web scrapping - manual copy/pasting returning different result from VBA identical procedure

Platoche56

New Member
Joined
Jul 29, 2017
Messages
2
Hi all,

I have taught myself a fair few languages over the past months and I just stumbled on something I cannot quite comprehend and extensive research online has not helped. The premise is super simple, I was trying to get basic info from a LinkedIn company page (for educational purposes only of course) and was able to extract virtually anything consistently from pages except for "similar companies" and "affiliated companies".

I have tried two main methods to access it: working with the html or simply copy pasting the web page content and then working within excel on that specific data. I do sometimes get the data through the "copy paste" strategy but this depends on which company page I deal with. It works for example for Mac Guff but does not for Pixar.

The odd thing is that when I copy paste manually for Pixar I dot get the similar and affiliated companies data while if I carry out the exact same procedure using VBA I do not get it....

The procedure I use is the following after the page has loaded:
Code:
ie.ExecWB 17, 0 '// select all
ie.ExecWB 12, 2 '//copy
tgt.Cells(1, 1).PasteSpecial '//paste data

I also tried using Sendkeys but it did not solve it either.

I know there is nothing with the code since I am able to get anything else. I know this is not due to the page not being loaded since I am able to extract data.

What am I missing :confused:? Did you ever come across something like this?

Many thanks,

A
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,021
Latest member
Justyna P

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