Excel VBA 質問スレ Part33
■ このスレッドは過去ログ倉庫に格納されています
0300デフォルトの名無しさん
2014/02/14(金) 22:46:45.67サイトは伏せさせてもらっていいでしょうか? ネットで調べて無理矢理作ったので洗練されてません。
Sub 自動ログイン()
Dim obj As Object
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
objIE.Navigate "https://《ログインしたいサイト》"
Do Until objIE.Busy = False
Do Until objIE.ReadyState = 4
Do Until objIE.Busy = False
DoEvents
Loop
Loop
Loop
CreateObject("WScript.Shell").AppActivate "《ログインしたいサイトのタイトル》"
Set objU = objIE.document.getElementsByName("SsLogonUser")
If objU.Length = 0 Then
MsgBox "ログインページが変わった?"
WScript.Quit
End If
objU(0).Value = "《ID番号はここ》"
Set objU = Nothing
objIE.document.getElementsByName("SsLogonPassword").Item(0).Value = "《パスワードはここ》"
Set objU = Nothing
'このあと、ログインできるようにしたいのですが…
End Sub
■ このスレッドは過去ログ倉庫に格納されています