Hello, I would really appreciate some help here.
I have written a series of macros in Excel that will be run through Access 2003. The Access Macros take data from a web page, copy, paste it in Excel, and the Excel Macros alter the data.
I need VBA in Access to be able to open a link, and click on a Java link. When I click on the link I want (manually) it says "javascript:submitForm('IL',")", so I assume I can have the Access code click this link?
here is my code run from an Access onclick button:
Private Sub Command10_Click()
Set myIE = CreateObject("InternetExplorer.Application")
'Navigates to a site
myIE.Navigate "http:\internal.site.asp"
myIE.Visible = True
'Waits 3 seconds to give page time to load
TWait = Time
TWait = DateAdd("s", 3, TWait)
Do Until TNow >= TWait
TNow = Time
Loop
'Cheesy way to copy the pages info
SendKeys "^a"
SendKeys "^c"
'Opens Excel, pastes the value
Dim OpenExcel As Object
Set OpenExcel = CreateObject("Excel.Application")
DoCmd.Hourglass True
OpenExcel.Workbooks.Open \\shareddrive\filename.xls
OpenExcel.Visible = True
DoCmd.Hourglass False
TWait = Time
TWait = DateAdd("s", 3, TWait)
Do Until TNow >= TWait
TNow = Time
Loop
'Excel macros will run here, I still need to figure out how to call them
End Sub
I am having a hard time figuring out how to open each of the javascript links, to do this procedure over again.
I really hope I am making sense :( Please help! I am so close to my goal!
Thanks again, Brent Surphlis