Sub abc()


 
    Application.ScreenUpdating = False
    
    Shell "wscript.exe ""C:\Users\abc\Desktop\abc.vbs"""




Set objShellApp = CreateObject("Shell.Application")
For Each objWindow In objShellApp.Windows
    Debug.Print objWindow.LocationName
     If LCase(objWindow.LocationName) = LCase("abc") Then
            
 
        Debug.Print objWindow.LocationURL
        If objWindow.LocationURL = "http://abc.aspx" Then
        
        Set objIe = objWindow
        GoTo Label8:
        


        Else


        GoTo Label9:
        End If
            
            
Label9:
     End If
Next


Label8:

objIe.document.all("button_Confirm").Click


'popup window appear all code cannot be run
HTML Code:
<input name="btn$button_Confirm" id="button_Confirm" style="font-weight: bold;" onclick="return confirm('Checked &amp; Confirmed?');WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;button_Confirm&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" type="submit" value="Check &amp; Confirm (Account)">

abc.vbs

Set wshShell =  CreateObject("WScript.Shell")


Do


    ret = wshShell.AppActivate("網頁訊息")


Loop Until ret = True


     WScript.Sleep 5000
     ret = wshShell.AppActivate("網頁訊息")
     If ret = True Then
        ret =  wshSheel.AppActivate("網頁訊息")
       WScript.Sleep 1000
       wshShell.Sendkeys "{enter}"
     End If


     WScript.Sleep 500