Hi,
My query is regarding internet explorer 6 automation via code in VBA (Excel 2003). I'm trying to open a page on clicking a button in main page.
I'm able to open both parent and child pages via VBA, but now want to automate events (like radio btn click etc) in child page.
Could you please help me in achieveing this?
below is my initial code -
Thanks,
Bhups
My query is regarding internet explorer 6 automation via code in VBA (Excel 2003). I'm trying to open a page on clicking a button in main page.
I'm able to open both parent and child pages via VBA, but now want to automate events (like radio btn click etc) in child page.
Could you please help me in achieveing this?
below is my initial code -
Rich (BB code):
'========
Sub ListLinks()
Dim IeApp As InternetExplorer
Dim sURL As String
Dim IeDoc As Object
Dim i As Long
'Create new instance of IE
Set IeApp = New InternetExplorer
'Make it visible - some things don’t work
'unless it’s visible
IeApp.Visible = True
'define the page to open
sURL = "http://test/welcome.aspx"
'navigate to the page
IeApp.Navigate sURL
'Pause the macro using a loop until the
'page is fully loaded
Do
Loop Until IeApp.ReadyState = READYSTATE_COMPLETE
'store the Document object
Set IeDoc = IeApp.Document
'click a button on the main page
Set ElementCol = IeDoc.getElementsByTagName("INPUT")
For Each btnInput In ElementCol
If btnInput.Value = "Open" Then
Set IeApp.Document = btnInput.Click 'This will open up another IE window
Exit For
End If
Next btnInput
'Clean up
Set IeApp = Nothing
IeApp.Quit
End Sub
'===========
Thanks,
Bhups
Last edited by a moderator: