Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [CODE]
- Dim oIe As InternetExplorer
- Dim User, Pass As String
- Dim Loaded As Boolean
- Dim Cnt As Variant
- Dim oCell As Object
- User = Sheet2.Cells(35, 5).Value
- Pass = Sheet2.Cells(35, 6).Value
- If User = "" Or Pass = "" Then
- MsgBox "Credentials are not entered.", vbCritical, "Dumbass"
- Sheet2.Cells(35, 6).Select
- End If
- Set oIe = FindIE("https://www.firstcommunityexpressnet.com/tob/live/usp-core/app/home")
- If oIe Is Nothing Then
- Set oIe = New InternetExplorer
- oIe.Visible = True
- oIe.navigate ("https://www.firstcommunity.com/home.html")
- 'wait for page to load
- Call SleepIE(oIe)
- PauseApp 3000
- 'loaded, now login.
- oIe.document.all.Item("username").Select
- oIe.document.all.Item("username").Value = User
- oIe.document.all.Item("password").Select
- oIe.document.all.Item("password").Value = Pass
- oIe.document.all.Item("oblSubmit").Click
- Call SleepIE(oIe)
- PauseApp 3000
- ' oIe.document.all.Item("ext-gen1020").Click
- Call SleepIE(oIe)
- PauseApp 1000
- End If
- 'Trying to determine if I'm in the correct html container using this loop.
- Cnt = 0
- With oIe.document.frames("0").document.all ''''''''''Here is where the error occurs.
- For Each oCell In .tags("div")
- Debug.Print oCell.innerText
- Cnt = Cnt + 1
- Next oCell
- End With
- Set oCell = Nothing
- '''''
- ''Things I've tried
- 'oIe.document.frames("0").document.body 'Same Error
- 'oIe.document.frames("main").document.all 'Same Error
- 'oIe.document.frames("main").document.body 'Same Error
- 'oIe.document.all ' This works, but doesn't navigate into the iframe. So it doesn't contain the data we need.
- [/CODE]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement