?
Solved

Inet control problem

Posted on 2006-04-12
4
Medium Priority
?
245 Views
Last Modified: 2010-05-01
Trying to transfer a file from our network to a remote server using the inet control.  It executes with no errors, but the file does get transferred.  

Here's my code:
inetDYC.URL = "<ip address>"
inetDYC.UserName = "<username>"
inetDYC.Password = "<password>"
inetDYC.Execute "put c:\temp\dyc_testfile.txt *.*"
Do While inetDYC.StillExecuting
   DoEvents
Loop
MsgBox "Finished"

The only inet property I set at design time is Protocol = 2 - icFTP (which automatically changed the RemotePort property to 21).

I can ftp the file from a command window without any problems.  And I've super-double checked the URL, username and password several times.

Looking forward to your responses.
0
Comment
Question by:MariaHalt
  • 3
4 Comments
 

Author Comment

by:MariaHalt
ID: 16439844
Sorry, there's a word missing in my original question..."...but the file does NOT get transferred..."  That's why it's a problem.
0
 

Author Comment

by:MariaHalt
ID: 16440193
By the way, the inet control is the Microsoft Internet Transfer Control (incase that wasn't clear).
0
 
LVL 10

Accepted Solution

by:
sakuya_su earned 2000 total points
ID: 16443927
maybe you cant use IP address in ur URL list..

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q163653

in there, all examples are done with a properly URL name, so maybe try that?
0
 

Author Comment

by:MariaHalt
ID: 16447663
sakuya_su,

Thank you for responding to my question.  I don't have the URL so I wasn't able to test your suggestion.  However, it got me looking more closely at my code and I modified it slightly, and it is now working (so I'm going to give you the points)!  

This is what I did:

inetDYC.Protocol = icFTP
inetDYC.RemoteHost = "<ip address>"
inetDYC.UserName = "<username>"
inetDYC.Password = "<password>"
inetDYC.Execute inetDYC.URL, "put c:\temp\dyc_testfile.txt dyc_testfile.txt"
Do While inetDYC.StillExecuting
   DoEvents
Loop
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question