[FONT=Courier New][SIZE=1]Option Explicit
Option Compare Text[/SIZE][/FONT]
[FONT=Courier New][SIZE=1][/SIZE][/FONT]
[FONT=Courier New][SIZE=1]Const MyUserName As String = "ruddles"
Const MyPassword As String = "password"[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]Const READYSTATE_COMPLETE As Integer = 4[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]Dim objIE As Object[/SIZE][/FONT]
[FONT=Courier New][SIZE=1][/SIZE][/FONT]
[FONT=Courier New][SIZE=1]Public Sub LoginToYahoo()
Set objIE = CreateObject("InternetExplorer.Application")
With objIE
.Visible = True
.Silent = True
.Navigate ("[/SIZE][/FONT][URL="https://login.yahoo.com/config/login"][FONT=Courier New][SIZE=1]https://login.yahoo.com/config/login[/SIZE][/FONT][/URL][FONT=Courier New][SIZE=1]")
Do Until .ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
Application.Wait Now() + TimeValue("00:00:02")
If InStr(objIE.document.body.innerhtml, "Not " & MyUserName & "?") = 0 Then
[COLOR=red][B].document.all.login.Value = MyUserName
[/B][/COLOR] End If
[COLOR=blue][B].document.all.passwd.Value = MyPassword
[/B][/COLOR] [COLOR=magenta][B].document.forms(0).submit
[/B][/COLOR] Do Until .ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
Application.Wait Now() + TimeValue("00:00:02")
End With[/SIZE][/FONT]
[FONT=Courier New][SIZE=1]
End Sub[/SIZE][/FONT]