I am getting a compile Error in Access.
I am guess I need a reference??
Currently I have checked.
"Visual Basic for applications"
"Microsoft Access 11.0 Object Library"
The Editor is highlighted section
Any suggestions?
I am guess I need a reference??
Currently I have checked.
"Visual Basic for applications"
"Microsoft Access 11.0 Object Library"
The Editor is highlighted section
Rich (BB code):
Set lnk = QPR.Document.Links(3)
Any suggestions?
Rich (BB code):
Public Function SKPIUPDATE()
Dim QPR
Dim lnk As Integer
Dim frm
Dim dwn
Dim Start
Dim fin
Dim drp1
Dim drp2
Dim drp3
Dim src1
' This macro will automatically open and download the TMMK-VEH daily scrap
'and store the file in the same directory
Set QPR = CreateObject("InternetExplorer.application")
QPR.Visible = True
QPR.navigate "https://www.portal.toyotasupplier.com/wps/myportal/"
TimeOut = Now + TimeValue("00:00:10") '-- wait maximum of 10 seconds
Do While QPR.Busy Or QPR.readyState <> 4
DoEvents
If Now > TimeOut Then
MsgBox "Time Out before Login"
Exit Function
End If
Loop
With QPR.Document.Forms("Login")
.User.Value = "*****"
.Password.Value = "*****"
.submit
End With
TimeOut = Now + TimeValue("00:00:10") '-- wait maximum of 10 seconds
Do While QPR.Busy Or QPR.readyState <> 4
DoEvents
If Now > TimeOut Then
MsgBox "Time Out after Login"
Exit Function
End If
Loop
QPR.navigate ("https://www.portal.toyotasupplier.com/skpi/")
TimeOut = Now + TimeValue("00:00:05") '-- wait maximum of 5 seconds
Do While QPR.Busy Or QPR.readyState <> 4
DoEvents
If Now > TimeOut Then
MsgBox "Time Out after Login"
Exit Function
End If
Loop
Set lnk = QPR.Document.Links(3) ' 3=TMMK-VEH,4=TMMK-PWT,5=TMMC,6=TMMTX,7=TABC,8=NUMMI,9=TMMI,10=TMMBC,11=TMMAL,12=TMMNK
TimeOut = Now + TimeValue("00:00:05") '-- wait maximum of 5 seconds
Do While QPR.Busy Or QPR.readyState <> 4
DoEvents
If Now > TimeOut Then
MsgBox "Time Out after Login"
Exit Function
End If
Loop
lnk.Click
End Function
Last edited: