Get Website Login

josros60

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

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
532
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,762
Messages
5,638,207
Members
417,014
Latest member
dualwieldbacon

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