| The nBit Easy FTP DLL can be added with ease to any vb6 or VBA project. |
|
|
| VB6 - Add a reference to the DLL in your project references. Goto tools -> references and select the nBitFTP component from the list. |
MSAccess - Add a reference to the DLL in your MDB. Goto tools -> references and select the nBitFTP component from the list. |
 |
 | You can use the DLL from your vb6 / VBA code as follows |
Option Explicit Dim WithEvents oftp As nBitFTP.clsFTP
Private Sub Form_Load()
Set oftp = New clsFTP ' you could also use late binding. Just declare the object as DIM oFTP as Object ' and then set oftp = createobject("nBitFTP.clsFTP")
End Sub
Private Sub cmdConnect_Click()
oftp.LicName = "YourOrderNumber" oftp.LicKey = "YourLicenceKey" oftp.Host = Me.txtHost oftp.UserName = Me.txtUserName oftp.Password = Me.txtPassword oftp.InitDir = Me.txtInit oftp.Passive = Me.chkPassive oftp.ShowDialog = Me.chkTransfer oftp.FTPPort = Me.txtFTPPort oftp.connect
end Sub
Private Sub cmdPut_Click() Me.CommonDialog1.ShowOpen If Me.CommonDialog1.FileName <> "" Then If oftp.PutFileProgress(Me.CommonDialog1.FileTitle, Me.CommonDialog1.FileName) Then cmdRefresh_Click End If End If End Sub
etc etc etc |
| It's as easy as that. For a more detailed example of the use of the DLL ( and an implementation of the full feature set ) please refer to the sample project after downloading the free evaluation version of the control. |