|
-
Apr 13th, 2006, 12:19 PM
#1
Thread Starter
Junior Member
ftp problem
VB Code:
Option Explicit
Dim Inet1
Private Sub Timer1_Timer()
'Upload or download files to FTP sites u
'sing only 5 lines of code!'Thanks for the example Venari, it's great to get 'shown up' sometimes! >:-D
With Inet1
.Protocol = icFTP
.UserName = "user" 'FTP servers require a valid logonid and password
.Password = "pass" 'before they Let you upload.
.RemoteHost = "mysite"
.Execute , "SEND C:\demo"
End With
End Sub
I get Variable not defined error. Something with icFTP I think.
-
Apr 13th, 2006, 04:18 PM
#2
Re: ftp problem
try this
VB Code:
Option Explicit
Dim Inet1
Private Sub Timer1_Timer()
'Upload or download files to FTP sites u
'sing only 5 lines of code!'Thanks for the example Venari, it's great to get 'shown up' sometimes! >:-D
With Inet1
[B].Protocol = 2[/B]
.UserName = "user" 'FTP servers require a valid logonid and password
.Password = "pass" 'before they Let you upload.
.RemoteHost = "mysite"
.Execute , "SEND C:\demo"
End With
End Sub
why are you using 'Dim Inet1' ? ? you should remove that and just drag the Inet onto your form, I think thats causing the error
-
Apr 13th, 2006, 06:41 PM
#3
Thread Starter
Junior Member
Re: ftp problem
 Originally Posted by the182guy
try this
why are you using 'Dim Inet1' ? ? you should remove that and just drag the Inet onto your form, I think thats causing the error
Someone told me
How would I drag Inet onto my form, sorry I am new.
-
Apr 13th, 2006, 07:36 PM
#4
Re: ftp problem
okay go to the menubar at the top click on project>components>microsoft Internet Transfer Control
then you will notice the little Inet icon appear in the toolbox on the left handside, just click on it and drag it onto the form, just like you would drag a command button or textbox etc
-
Apr 13th, 2006, 07:54 PM
#5
Thread Starter
Junior Member
Re: ftp problem

I get this error.
msinet.ocx is in my system32 folder.
-
Apr 13th, 2006, 08:07 PM
#6
Re: ftp problem
which version of VB do you have? is it VB6 Enterprise, or Standard, etc? I thnk thats the problem
-
Apr 13th, 2006, 08:10 PM
#7
Thread Starter
Junior Member
Re: ftp problem
No, its enterprise, sorry...
I just tried this:
1. Locate Regsvr32.exe on your machine. Note its path.
2. Locate the offending OCX file(s), usually found in the Windows\System folder for Windows 95, Windows 98, and Windows Me, or the Windows\System32 folder for Windows NT and Windows 2000.
3. On the Start menu, click Run.
4. In the Run dialog box, type the following:
<Path to RegSvr32>\REGSVR32.EXE /u <Path to OCX>\OCXFILE.OCX
For example:
C:\Devstudio\VB\REGSVR32.EXE /u C:\Winnt\System32\COMCTL32.OCX
NOTE: If Regsvr32.exe is in the System or System32 folder, the path is optional.
5. If you are reinstalling an older version of the control, you should delete/remove the .OCX, .OCA and .DEP files so they will be replaced.
6. Repeat the previous 3 steps for each offending OCX.
7. On Control Panel, click Add\Remove Programs.
8. Select Visual Basic, and click Add\Remove.
9. Click Reinstall when the options (Add\Remove, Remove All, Reinstall) dialog box appears.
http://support.microsoft.com/default...b;en-us;177799
and I recieved an error and now the inet is completly gone from the components menu.
The above did not work, still getting same error.
Last edited by uainfantry; Apr 13th, 2006 at 08:39 PM.
-
Apr 13th, 2006, 09:35 PM
#8
Re: ftp problem
Did you buy VB6, or did you get it from someone?
-
Apr 13th, 2006, 10:18 PM
#9
Thread Starter
Junior Member
Re: ftp problem
My friend has it, I need a file from the cd?
-
Apr 15th, 2006, 12:46 AM
#10
Thread Starter
Junior Member
Re: ftp problem
Well, I can't get it to work.
Is there another way for me to add a script to a timer which would upload a file at a set time interval. I need something simple.
I found a complete project for an ftp program but I can't figure out how to extract the code I need from it.
Something wininet.dll?
Last edited by uainfantry; Apr 15th, 2006 at 02:58 AM.
-
Apr 18th, 2006, 09:26 PM
#11
Re: ftp problem
 Originally Posted by uainfantry
My friend has it
Does your code work on your friend's computer?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|