Sub NaverLogin()
Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.Visible = True
IE.navigate "https://nid.naver.com/nidlogin.login"
Application.Wait Now + TimeSerial(0, 0, 2)
SendKeys "{tab}", True
With IE.document.all
.Item("id").Value = "네이버아이디"
.Item("pw").Value = "비밀번호"
.Item("log.login").Click
End With
End Sub
Dim js As IJavaScriptExecutor = TryCast(IE, IJavaScriptExecutor)
js.ExecuteScript("document.getElementsByName('id')[0].value=""" & _nhnID & """")
For n = 1 To RandomInteger(5, 15) : Sleep(25) : Application.DoEvents() : Next '
js.ExecuteScript("document.getElementsByName('pw')[0].value=""" & _nhnPW & """")
For n = 1 To RandomInteger(5, 15) : Sleep(25) : Application.DoEvents() : Next '
ByXPathClick("//input[@class='btn_global']", "", True)