![]() |
|
#5
|
|||
|
|||
|
Hi,
I found this bit of code see if you can use it. I'm not web savey. This is only to see if it helps you. There is a lot of sample code out there... Code:
Option Explicit
Sub IE_login()
Dim ie As InternetExplorer
Dim C
Dim ULogin As Boolean, ieForm
Dim MyPass As String, MyLogin As String
redo:
MyLogin = Application.InputBox("Please enter your VBAX login", "VBAX username", Default:="login", Type:=2)
MyPass = Application.InputBox("Please enter your VBAX password", "VBAX Password", Default:="Password", Type:=2)
If MyLogin = "" Or MyPass = "" Then GoTo redo
Set ie = New InternetExplorer
ie.Visible = True
ie.Navigate "http://www.vbaexpress.com"
'Loop until ie page is fully loaded
Do Until ie.ReadyState = READYSTATE_COMPLETE
Loop
'Look for password Form by finding test "Password"
For Each ieForm In ie.Document.forms
If InStr(ieForm.innertext, "Password") <> 0 Then
ULogin = True
'enter details
ieForm(0).Value = MyLogin
ieForm(2).Value = MyPass
'login
ieForm.submit
Exit For
Else
End If
Next
If ULogin = False Then MsgBox "User is aleady logged in"
Set ie = Nothing
End Sub
Code:
Sub SetRefs()
Dim ObRef
On Error Resume Next
' Adds Internet Controls Ref
ThisWorkbook.VBProject.References.AddFromGuid "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}", 1, 1
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Require assistance in writing code to login to webmail account. | saurabhlotankar | Excel Programming | 4 | 05-21-2015 10:47 AM |
Extract Excel Data from Chart in Word
|
cillianmccolgan | Word | 1 | 08-15-2014 01:42 AM |
How to extract data from Excel database to create word report for each patient (row)
|
nightale | Word | 3 | 07-06-2014 04:17 PM |
| Macro to login to horseracebase.com web site and download today cards file | Catalin.B | Excel Programming | 3 | 10-20-2013 10:02 AM |
| Extract Numbers from Zip Code | Karen615 | Excel | 3 | 09-21-2011 06:54 AM |