LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Click on button using VBA

Guys i need to Click on web page button using Excel Macro.

the source is as follows

<button type="button" class="button" onMouseOver="this.className='buttonOn'" onMouseOut="this.className='button'" onClick="submitForm('search.basicSearchForm','sear ch.basicSearchValidate');"Search</button

My code is

Set objCollection = IE.document.getElementsByTagName("button")

i = 0

While i < objCollection.Length
If objCollection(i).onClick="submitForm('search.basic SearchForm','search.basicSearchValidate');" Then

Set objElement = objCollection(i)

End If
i = i + 1
Wend


objElement.Click


This is not working..
Please give me ideas(simple though as i am a beginner in this)


Mats.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
after click a button(commandbutton), getting the button name x taol Excel Programming 3 February 15th 08 09:35 PM
How Can I Click an un-name IE button via VBA angsoka Excel Programming 3 July 24th 06 03:56 AM
Create floating button based on button click in menu ExcelMonkey Excel Programming 2 October 12th 05 06:43 PM
On Button Click(Help!) jpizzle[_2_] Excel Programming 1 June 3rd 05 11:32 AM
VBA button click need help. Need LEN help. Nigel Cummins Excel Programming 4 July 11th 03 08:52 PM


All times are GMT +1. The time now is 05:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"