Get Website Login

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
784
Office Version
  1. 365
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 change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
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
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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