Scraping from Website with Password VBA help needed

DeeEmmEss

New Member
Joined
Nov 25, 2015
Messages
43
I am trying - in vain at the moment - to scrape data with VBA assistance from a password protected site to which I am a member and have an authorised username and password - and import into Excel 2019. My VBA currently opens a new IE page, goes to the website concerned, enters username and password and then I stumble. I have tried all manner of attempts as per below but have been frustrated at my lack of success.

b>Login</b> <input type='textbox' name='login' size=8> <b>Pass</b><input type='password' name='password' size=8>
<input class='weebutton' type='submit' value='GO!'></form></td><td valign=top class=small2><a href='lostdetails.php'>Forgot?</a><br><a href='subscribe.php'>Free Trial</a></td></tr></table>

Above is an extract from the website I am trying to enter which contains the details I need to get to the next stage.

I get as far as :

.Document.all.Item("Login").Value = "*************"
.Document.all.Item("Password").Value = "********************"
But then get stuck with:


.Document.forms (0).submit.Click()
.Document.forms(0).submit.Value = "GO!"
.Document.forms(0).submit.Value="GO
.Document.forms(0).submit.Value="GO" Click
.Document.forms(0).submit.Value="GO"Click()
.Document.all.Item("Submit").Value.Click()
.Document.all.Item("Submit").Value = "GO!"
.Document.all.Item("Submit").Click()
ad infinitum, without success. My VBA knowledge is limited so be gentle and please help a frustrated 64 year old!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try .Document.forms(0).submit, assuming it is the first (0) form on the page.
 
Upvote 0
Solution

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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