MrMajik
IS-IT--Management
- Apr 2, 2002
- 267
I found the code at the bottom of this message here in a thread and for some reason I can't get it to work. I have it pulling in a webpage to the Internet window in my form using this:
WebBrowser1.Navigate2 "ftp://userassword@ftp.site.com"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
but when the code moves to the next line (exactly as typed)
Set ftpFolder = WebBrowser1.Document.Folder
I get the following error:
Run-time error 438:
Object does not support this object or method.
I have referenced
Microsoft Shell Controls and Automation
Microsoft Internet Controls
and have the Microsoft Internet Control component added.
Do you know what I am missing to get this to work?
Thank you.
========================================================
Option Explicit
' Webbrowser variant
Private Sub Command1_Click()
Dim ftpFolder As Folder
WebBrowser1.Navigate2 "ftp://userassword@ftp.site.com"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
Set ftpFolder = WebBrowser1.Document.Folder
ftpFolder.CopyHere "c:\test.txt"
End Sub
Thank you,
MrMajik
There are 10 types of people in the world:
Those that understand binary and those that don't.
WebBrowser1.Navigate2 "ftp://userassword@ftp.site.com"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
but when the code moves to the next line (exactly as typed)
Set ftpFolder = WebBrowser1.Document.Folder
I get the following error:
Run-time error 438:
Object does not support this object or method.
I have referenced
Microsoft Shell Controls and Automation
Microsoft Internet Controls
and have the Microsoft Internet Control component added.
Do you know what I am missing to get this to work?
Thank you.
========================================================
Option Explicit
' Webbrowser variant
Private Sub Command1_Click()
Dim ftpFolder As Folder
WebBrowser1.Navigate2 "ftp://userassword@ftp.site.com"
Do Until WebBrowser1.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
Set ftpFolder = WebBrowser1.Document.Folder
ftpFolder.CopyHere "c:\test.txt"
End Sub
Thank you,
MrMajik
There are 10 types of people in the world:
Those that understand binary and those that don't.