Get Website Login

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
529
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,
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
529
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,129,284
Messages
5,635,305
Members
416,851
Latest member
zeldadav

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