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