Inet controls

mdmilner

Well-known Member
Joined
Apr 30, 2003
Messages
1,362
I realize I'm being a little stubborn. I can do this by executing a shell command to open FTP and to use a batch file as the series of commands...but, it appears I can use a pure code (no DOS) to do this.

What I'd like to do is ftp data to a location where I can import it into Office.
I found this:

Private Declare Function URLDownloadToFile Lib "urlmon" Alias _
"URLDownloadToFileA" (ByVal pCaller As Long, ByVal strURL As String, _
ByVal strFileName As String, ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As Long

But the syntax it needs for the strURL is:
user:password@host:port/url-path

Problem is, the ability to throw user:password was removed (patched) by MSN due to a vulnerability with it just a few weeks ago.

Found these references:
http://search.microsoft.com/search/...n&st=a&qu="internet+transfer+control"&c=0&s=1
and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/office97/html/web/015.asp

I found MSInet.ocx on my machine and added a reference, but now I'm running into the most basic of problems.

How to use it.

Tried

Dim Inet1 As Inet
With Inet1
.AccessType = icUseDefault
End With

But this fails – it acts like it doesn’t know what this is.
Good 'ol Runtime Error '91'
Object Variable or With Variable not set

Any ideas at all?

Mike
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Well drat - I keep doing this. Posting a question and figuring it out.
At least, I think I'm closer.

Think I was misreading the example.
As information should anybody be searching here later...

You add the Internet Control to the form and then add Text Boxes/Buttons referencing the control to have it do things. So far I've made this return a webpage.

Code:
Private Sub btnURL_Click()
    Me.Text1.Value = Inet1.OpenURL("http://www.microsoft.com/")
End Sub

Name of the Internet Control is Inet1


Mike
 
Upvote 0

Forum statistics

Threads
1,221,672
Messages
6,161,198
Members
451,688
Latest member
Gregs44132

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top