Visual Basic for Applications (VBA)
Click webpages button entry via vba
Hi, I run the following code with this argument "http://www.google.com/trends/explore#q=dollar%20crash%2C%20dollar%20crisis%2C%20dollar%20weakens&cmpt=q" Function GoogleTrends(URL As String) As Variant() Dim browser As SHDocVw.InternetExplorer Set browser = CreateObject("InternetExplorer.Application") browser.Navigate (URL) browser.StatusBar = False browser.Toolbar = False browser.Visible = True browser.Resizable = False browser.AddressBar = False 'Pause the macro using a loop until the 'page is fully loaded Do Loop Until browser.ReadyState = READYSTATE_COMPLETE 'Set gearwheel = browser.Document.Forms(0).Item(...) browser.Quit Exit Function ThereWasBadCalculation: GoogleTrends = CVar(0) End Function Please set a breakpoint in the line browser.Quit. Now have a look on the website opened by GoogleTrends. In the upper left there is a button looks like a gearwheel. I want to click the buttons entry Download as CSV. How to do this? I tried the following without success: 1) Right click on the website and select View Source. 2) In the websites code I have searched for Download as CSV. 3) Due to my understanding of the websites structure the buttons id is exportMI. 4) By parsing the object browser.Document.getElementById("exportMI"), I have not found a way to select or submit the entry Download as CSV! What is wrong? Thank you very much! Regards, Lloyd
Hi Lloyd, Thank you for posting in the MSDN Forum. According to your description, I think your major concern is about IE automation using VBA. So, I'll move your thread to Visual Basic for Applications (VBA) forum for better handling. The experts there are more familiar with your issue and may give your more suggestions or workarounds. Thank you for your understanding. Best regards,Quist Zhang [MSFT] MSDN Community Support | Feedback to us
Hi Quist, thank you very much! Regards, Lloyd
Splitting a range into to 2 ranges based on values from another range
VBA - Select Case Statement - Array
For/Next Loop not working
Using Dictionary in VBA
Changing destination sheet using VBA
VB script for Excel 2010 that will do a search for any word or phrase in my entire workbook.
Reading data from Notepad and writing into a table in Access
VBA code for saving a ppt working in debug mode,not in real run
VBA Move Paragraphs in Document Using XL
Method range of object_Worksheet failed???
Adding text labels to points on a chart.
Is it possible to set project references at run-time?
Using a condition of =H1<H2 or =H1>H2, How to format H1 instead of H2?
Conditionally formatting a looped range of cells based on value in other cell in VBA
How to get the List of Visible Items from a Pivot Field using VBA
How to run a macro when a Filter is applied on Particular Pivot Field