Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE automation query

Status
Not open for further replies.

robcarr

Programmer
May 15, 2002
633
GB
Hi,

I am using the code below

Code:
With objie
        .Visible = True
        Do While .Busy Or .ReadyState <> 4: DoEvents: Loop
    With .document.forms("aspnetForm")
        .ctl00_MainContent_txtSiteHistoryStartDate.Value = sdate
        .ctl00_MainContent_txtSiteHistoryEndDate.Value = edate
 objie.document.aspnetform("ctl00_MainContent_btnSiteHistoryRefresh").Click

to enter and refresh data on the screen. I now need to export this data, I have an export link on the page.

when i hover over the link i need to automate i see the following.
Code:
javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$MainContent$btnSiteHistoryExport", "", true, "PDATE", "", false, true))

however i can not automate the clicking of the link.

i have tried the following with no luck

Code:
 Call objie.document.parentWindow.execScript("document.aspnetform.ctl00$MainContent$btnSiteHistoryExport", "", True, "PDATE", "", False, True)
    objie.document.aspnetform("ctl00$MainContent$btnSiteHistoryExport").Click

any ideas.



Hope this is of use, Rob.[yoda]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top