'Click on pop up in browser using vba excel

I am trying to automate the login and then selecting date range in my office internal application to save my time using VBA excel 2013 script. I am successfully able to login and the passing date and time to the fields. After clicking on submit, a pop up dialogue box is opening.

I am not able to click on "Yes" in pop up generated in browser.

Before this point the below vba code is working fine.

Sub automaticformfilling()
Dim ie As Object
Set ie = CreateObject("internetexplorer.application")

With ie
    .Visible = True
    .navigate "http://abcd/default.asp"
Do While .busy
    DoEvents
Loop

Do While .readystate <> 4
    DoEvents
Loop
End With

Set fname = ie.document.getelementbyid("txtEmpId")
fname.Value = "abc"

Set pass = ie.document.getelementbyid("txtPassword")
pass.Value = "abc2017"

ie.document.getelementbyid("image1").Click

Set fdate1 = ie.document.getelementsbyname("fmSLADt")(0)
fdate1.Value = "12/08/2017"
Set ftime1 = ie.document.getelementsbyname("fmSLATm")(0)
ftime1.Value = "00:00:00"

ie.document.getElementsByTagName("img")(11).Click

After this part I need to click on "Yes" in pop up box to continue.

pop up image



Solution 1:[1]

There's a ton of examples from others who had the same issue.

Couple links to get you started:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ashleedawg