View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
R.VENKATARAMAN R.VENKATARAMAN is offline
external usenet poster
 
Posts: 110
Default data from external webpage

I searched the googles groups to get some insight into this. But I could
not get exactly what I want.
I know some experts do not recomment using <sendkeys

however I want to get data from a webpage into excel . It is is not simple
using <new web query. In the webpage I have to click one of the two
option(or are they checkboxes?) boxes and then enter a text in the small
window. finally I have to click something like a command button <submit

I do have some codes wherein you have to simply enter the user id and
password in the code and run it. .
The EXTRACT ONLY of the sub is
While appIE.busy
DoEvents
Wend
appIE.navigate "https://access.leggmason.com/"
While appIE.ReadyState < READYSTATE_COMPLETE
DoEvents
Wend
SendKeys "excel", True '----------this is user id
SendKeys "{TAB}", True
SendKeys "hello", True '------------this is password
SendKeys "{ENTER}", True

Of course this code also gives problem at READYSTATE_COMPLETE but I used a
variant dim for this.
it works in some cases but it does not work in some other cases where due
to security reason the webpage asks again for the password(example-yahoo
mail). I tried to modify the same code in the mouse clicking case also. B
ut I am stumped as I could not find the keyboard short cut for clicking the
mouse. In the case of <submit button i presume that I can use <enter key.

It is obvious I have not understood fully the sub

Highly thankful for any suggestion how to go about . I am fairly familiar
with excel and VBA.
mine excel 2000/windows 98 SE
the relevant url is
http://www.bseindia.com/histdata/stockprc.asp

regarads