Hey everyone,
I'm re-posting my problem.
The macro below works great only if Internet Explorer is closed, if IE is opened, the macro malfunctions...
Any ideas? It took me about 2 weeks to figure out that an "open webpage" in the background was the cause of my macro hick-hop.
This is a major problem, I need the macro to launch it's own new window, regardless of any other open IE windows.
Cheers,
Sprucy
-----------------------
Sub I_GetWebData()
'
' Macro recorded 11/20/2005 by
'Open site if it requires a PassWord Model or field input validation
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
'Go to this Web Page: enter below
ie.Navigate "www.private.intranet.sorry"
'Check for good connection to web page loop!
Do
If ie.ReadyState = 4 Then
ie.Visible = False
Exit Do
Else
DoEvents
End If
Loop
'Wait for window to open!
Application.Wait (Now + TimeValue("0:00:03"))
'MsgBox "Done"
ie.Visible = True
'Send date based on Cell A1!
SendKeys "{TAB}", True
SendKeys "{TAB}", True
'May need additional SendKeys as needed?
'Determine by the actual key-stroks needed!
SendKeys Sheets("DCC").[a1].Value, True
SendKeys "{TAB}", True
SendKeys "{ENTER}", True
Application.Wait (Now + TimeValue("0:00:03"))
With ie
.Visible = True
DoEvents
.ExecWB 17, 2
.ExecWB 12, 2
Sheet2.Paste Sheets("WebDrop").Range("A1")
End With
--------------------------------
I'm re-posting my problem.
The macro below works great only if Internet Explorer is closed, if IE is opened, the macro malfunctions...
Any ideas? It took me about 2 weeks to figure out that an "open webpage" in the background was the cause of my macro hick-hop.
This is a major problem, I need the macro to launch it's own new window, regardless of any other open IE windows.
Cheers,
Sprucy
-----------------------
Sub I_GetWebData()
'
' Macro recorded 11/20/2005 by
'Open site if it requires a PassWord Model or field input validation
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
'Go to this Web Page: enter below
ie.Navigate "www.private.intranet.sorry"
'Check for good connection to web page loop!
Do
If ie.ReadyState = 4 Then
ie.Visible = False
Exit Do
Else
DoEvents
End If
Loop
'Wait for window to open!
Application.Wait (Now + TimeValue("0:00:03"))
'MsgBox "Done"
ie.Visible = True
'Send date based on Cell A1!
SendKeys "{TAB}", True
SendKeys "{TAB}", True
'May need additional SendKeys as needed?
'Determine by the actual key-stroks needed!
SendKeys Sheets("DCC").[a1].Value, True
SendKeys "{TAB}", True
SendKeys "{ENTER}", True
Application.Wait (Now + TimeValue("0:00:03"))
With ie
.Visible = True
DoEvents
.ExecWB 17, 2
.ExecWB 12, 2
Sheet2.Paste Sheets("WebDrop").Range("A1")
End With
--------------------------------