ExcelRooky91
New Member
- Joined
- Apr 3, 2018
- Messages
- 10
Hi all,
I'm a VBA rookie and I have only just begun my dive into this deep realm of new learnings due to the limitation of formulas.
I’m attempting to use VBA to open internet explorer, click a search button, then extract the tabled information presented.
The website is: https://www.nzfma.org/data/search.aspx
The code I have so far only opens the website. I have played around with different commands I have read on the forums to try and click the “search” button.
The two search criteria on the webpage: “Search for” & “date” pre-populate correctly (being "Bank Bill Reference Rates" & Today's date) so I don’t think I need to define these which makes it easier.
I think I know how to automatically save the work book down, and I can open the website, I’m just lacking the knowledge to do the steps in between haha. My basic code is below.
If anyone is able to provide some guidance or coding help it would be much appreciated.
Kind regards,
ExcelRooky91
I'm a VBA rookie and I have only just begun my dive into this deep realm of new learnings due to the limitation of formulas.
I’m attempting to use VBA to open internet explorer, click a search button, then extract the tabled information presented.
The website is: https://www.nzfma.org/data/search.aspx
The code I have so far only opens the website. I have played around with different commands I have read on the forums to try and click the “search” button.
The two search criteria on the webpage: “Search for” & “date” pre-populate correctly (being "Bank Bill Reference Rates" & Today's date) so I don’t think I need to define these which makes it easier.
I think I know how to automatically save the work book down, and I can open the website, I’m just lacking the knowledge to do the steps in between haha. My basic code is below.
If anyone is able to provide some guidance or coding help it would be much appreciated.
Kind regards,
ExcelRooky91
Code:
[Sub Automate_IE_Load_Page()
'To load the webpage in IE
Dim i As Long
Dim URL As String
Dim IE As Object
Dim objElement As Object
Dim objCollection As Object
'Create InternetExplorer Object
Set IE = CreateObject("InternetExplorer.Application")
'Set IE.Visible = True so as to make IE visible
IE.Visible = True
'Define URL
URL = "[URL]https://www.nzfma.org/data/search.aspx[/URL]"
'Navigate to URL
IE.Navigate URL
Do
DoEvents
Loop Until IE.ReadyState = 4
End Sub
/CODE]