800.682.0200 | FAX: 360.568.2923 | About Us | Downloads | Manuals | Home | Index
Minisoft News
Minisoft Support
Network File Transfer
The MdmFT in VBA Session
The MdmFT session can be called from any Visual Basic for Applications (VBA) application.
Sub FTSession() 'Exists Action Const gcCancel = 0 Const gcReplace = 1 Const gcPrompt = 2 Const gcAppend = 3 'Direction Const gcUpload = 0 Const gcDownload = 1 'File Type Const gcASCII = 0 Const gcBinary = 1 Dim FTSession As Object On Error GoTo Egress1 Set FTSession = CreateObject("NetFT.Session") FTSession.HostAddress = "support.minisoft.com" FTSession.Port = 30001 FTSession.LoginUser = "neal" FTSession.LoginAccount = "minisoft" FTSession.UserPassword = InputBox("User Password") If (Not FTSession.Connect) Then MsgBox "1 - " & FTSession.ErrorMessage GoTo Egress1 End If FTSession.DisplayStats = True FTSession.Direction = gcDownload FTSession.LocalFile = "TestFile" FTSession.TransferMode = gcASCII FTSession.HostFile = "INSTINFO.MM.MINISOFT" If (FTSession.StartTransfer <> 0) Then MsgBox "3 - " & FTSession.ErrorMessage GoTo Egress1 End If GoTo Egress2 Egress1: MsgBox "Error Exit" Egress2: If FTSession.ConnectStatus = True Then FTSession.Disconnect End If Set FTSession = Nothing End Sub
Minisoft Inc. 1024 First Street Snohomish, WA 98290 Phone: (800) 682-0200 Fax: (360) 568-2923 Copyright ©2008 Minisoft, Inc. License Agreement