VBA Express Forum  




Go Back   VBA Express Forum > VBA Code & Other Help > Other Applications Help
     Feedback     
Register FAQ Members Arcade Knowledge Base Training Articles Consulting

Reply
 
Thread Tools Display Modes
Old 08-09-2011, 08:19 AM   #1
Sakke

 
Joined: Mar 2011
Posts: 3
Kb Entries: 0
Articles: 0
Vba find popup web form and use it - half finished

Hi,

The script below works performs the following.

It checks you open browsers to match the title. In that IE window it tries to find a specific text field to enter information. This all works like a charm, however, as it is now the page I am working with is quite annoying. What it does is that within the page there is a popupform (when one clicks a button , in java) (not a new IE window) with the textbox I want to be filled.

This popup has its own code and title and can thus not be found by using the original IE title. But since it does not open in a separate IE window I cannot search for IE title, neither can I use the URL of the popup.


Is there a way to search all the popup within the page with the specified title (Title: JavaSocksPopup), alternatively use my script to click the button (which should be a problem), and then change to the new popup form and fill it in?


I know that this is a long shot but doing this manually is killing me… (copy paste copy paste etc…)

VBA:
Sub Button3_Click() 'find the right internet explorer webpage Dim allExplorerWindows As New SHDocVw.ShellWindows Set allExplorerWindows = New SHDocVw.ShellWindows Dim IEwindow As SHDocVw.InternetExplorer Dim foundFlag As Boolean foundFlag = False For Each IEwindow In allExplorerWindows If TypeName(IEwindow.Document) = "HTMLDocument" Then 'check the title If IEwindow.Document.Title = "Sockparty Detail" Then ' we found the right window then IEwindow.Visible = True 'get the pages entire main IE document Dim mainDoc As HTMLDocument Set mainDoc = IEwindow.Document mainDoc.all("socks_S").Value = "375" Else End If End If Next End Sub
VBA tags courtesy of www.thecodenet.com

Local Time: 04:05 AM
Local Date: 05-20-2013

 
Reply With Quote Top
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 07:05 PM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004 - 2012 VBA Express