View Single Post
 
Old 12-14-2012, 01:34 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi CatMan,

You seem to be using two Shell statements - one for Firefox (though you previously said it was an IE window) and the other for Windows Explorer.

So far, though, you've only posted a brief snippet for the Windows Explorer shell, and that's what I've been concentrating on. And what I've been saying is that you don't need the Windows Explorer Shell - you can get the file using other methods.

You quite possibly don't need the IE/Firefox shell, either, as IE can be automated without it. Just a brief example:
Code:
Sub Get_URL_Data()
'References to Internet Explorer & Microsoft HTML required
Application.ScreenUpdating = False
Dim Browser As SHDocVw.InternetExplorer
Dim HTMLDoc As MSHTML.HTMLDocument
StrData As String
Set Browser = New SHDocVw.InternetExplorer
'Open the web page
Browser.navigate "https://www.msofficeforums.com/excel-programming/15359-close-downloads-window-vba.html"
Do While Browser.Busy
  DoEvents
Loop
Set HTMLDoc = Browser.Document
Do While Browser.Busy
  DoEvents
Loop
'Get the data
StrData = HTMLDoc.body.innerText
MsgBox StrData
'Close the browser
Browser.Quit
Set HTMLDoc = Nothing: Set Browser = Nothing
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote