I have windows titles like Maintain, Create, Mainmenu – Information. I am using the following code, and my problem is, though user open the above windows in any of the order, first task should perform on “maintain” page then “create” and then last “Mainmenu – Information”.
Now, what is happing , if title is create, then it is directly going to “create” but that is wrong because I have to do something on “maintain” first and grab some values then come to “create”.
Can anyone suggest me how can achieve this.
Dim allExplorerWindows As New SHDocVw.ShellWindows
Set allExplorerWindows = New SHDocVw.ShellWindows
Dim IeGPS As SHDocVw.InternetExplorer
Dim foundFlag As Boolean
foundFlag = False
For Each IeGPS In allExplorerWindows
If InStr(IeGPS.LocationURL, "my web site") <> 0 Then
nameofweb = IeGPS.document.Title
if nameofweb=”maintain” then
if nameofweb=”create” then
if nameofweb=” Mainmenu – Information.” then