View Full Version : VBA Code To Click Button On Web Page
vishwakarma
08-02-2011, 10:26 PM
Hi,
How can we click a button on a webpage?
HTML source code
<input value="Export Details" class="btn" name="csvsetup" title="Export Details" type="submit" />
Thanks...
mohanvijay
08-03-2011, 11:17 PM
reference the Microsoft Internet controls and try this
Dim Brow As New InternetExplorer
Dim Hdoc As HTMLDocument
Dim URL As String
URL = "Your_url"
Brow.Silent = True
Brow.navigate URL
Brow.Visible = True
Do
Loop Until Brow.readyState = READYSTATE_COMPLETE
Set Hdoc = Brow.document
Hdoc.all.csvsetup.Click
vishwakarma
08-04-2011, 12:21 AM
Thanks Mohanvijay,
I tried ur code, but it is giving me an error "User-defined type not defined"
Thanks...
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.