Get Website Login

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
524
Hi,

found this code to get the html coding box for username, password when i run get the error: compile error Next without for, please help.

code:

Code:
Private Sub GetWebsiteInfo()

On Error Resume Next


Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")


ie.navigate "https://360.allstream.com"


ie.Visible = True


Do While ie.Busy And Not ie.readyState = 4
DoEvents
Loop


DoEvents
Dim k As Integer


Do While ((ie.Busy) And (Not (ie.readyState = 4)))
DoEvents
Loop


MsgBox ("start now")


Dim i As Integer
Dim holder As Long
'j = 0
For i = 1 To ie.document.all.Length - 1
holder = 0


Sheets("Sheet1").Cells(i, 2) = ie.document.all.Item(i).tagName
Sheets("Sheet1").Cells(i, 1) = ie.document.all.Item(i).href
holder = InStr(1, ie.document.all.Item(i).href, "SuminBoxes.xls", vbTextCompare)
If holder > 0 Then
j = j + 1
Sheets("Sheet1").Cells(j, 3) = ie.document.all.Item(i).tagName
Sheets("Sheet1").Cells(j, 4) = ie.document.all.Item(i).Name


Next i


DoEvents
End Sub

thanks,
 

Some videos you may like

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
524
Thank you so much for your help it worked.

one question get the info thought will give the html id coding for box name for user and password.

Thanks
 

Watch MrExcel Video

Forum statistics

Threads
1,127,921
Messages
5,627,635
Members
416,257
Latest member
salomon

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
Top