{"id":1934,"date":"2014-11-14T00:32:36","date_gmt":"2014-11-14T00:32:36","guid":{"rendered":"https:\/\/alt2.minisoft.com\/support\/?p=1934"},"modified":"2014-11-18T22:33:15","modified_gmt":"2014-11-18T22:33:15","slug":"mpe-file-transfer-mdmft-and-vba","status":"publish","type":"post","link":"https:\/\/c002.minisoft.com\/support\/mpe-file-transfer-mdmft-and-vba\/","title":{"rendered":"MPE File Transfer (MDMFT) and VBA"},"content":{"rendered":"<p><strong>The MdmFT in VBA Session<\/strong><\/p>\n<p>The MdmFT session can be called from any Visual Basic<br \/>\nfor Applications (VBA) application.<\/p>\n<pre>Sub FTSession()\r\n'Exists Action\r\nConst gcCancel = 0\r\nConst gcReplace = 1\r\nConst gcPrompt = 2\r\nConst gcAppend = 3\r\n\r\n'Direction\r\nConst gcUpload = 0\r\nConst gcDownload = 1\r\n\r\n'File Type\r\nConst gcASCII = 0\r\nConst gcBinary = 1\r\n\r\nDim FTSession As Object\r\n\r\nOn Error GoTo Egress1\r\nSet FTSession = CreateObject(\"NetFT.Session\")\r\nFTSession.HostAddress = \"support.minisoft.com\"\r\nFTSession.Port = 30001\r\nFTSession.LoginUser = \"neal\"\r\nFTSession.LoginAccount = \"minisoft\"\r\nFTSession.UserPassword = InputBox(\"User Password\")\r\n\r\nIf (Not FTSession.Connect) Then\r\nMsgBox \"1 - \" &amp; FTSession.ErrorMessage\r\nGoTo Egress1\r\nEnd If\r\n\r\nFTSession.DisplayStats = True\r\nFTSession.Direction = gcDownload\r\nFTSession.LocalFile = \"TestFile\"\r\nFTSession.TransferMode = gcASCII\r\nFTSession.HostFile = \"INSTINFO.MM.MINISOFT\"\r\nIf (FTSession.StartTransfer &lt;&gt; 0) Then\r\nMsgBox \"3 - \" &amp; FTSession.ErrorMessage\r\nGoTo Egress1\r\nEnd If\r\nGoTo Egress2\r\n\r\nEgress1:\r\nMsgBox \"Error Exit\"\r\n\r\nEgress2:\r\nIf FTSession.ConnectStatus = True Then\r\nFTSession.Disconnect\r\nEnd If\r\nSet FTSession = Nothing\r\n\r\nEnd Sub<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The MdmFT in VBA Session The MdmFT session can be called from any Visual Basic for Applications (VBA) application. Sub FTSession() &#8216;Exists Action Const gcCancel = 0 Const gcReplace = 1 Const gcPrompt = 2 Const gcAppend = 3 &#8216;Direction Const gcUpload = 0 Const gcDownload = 1 &#8216;File Type Const gcASCII = 0 Const [&hellip;]<\/p>\n","protected":false},"author":75,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[61,54,60],"tags":[],"_links":{"self":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/1934"}],"collection":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/users\/75"}],"replies":[{"embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/comments?post=1934"}],"version-history":[{"count":1,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/1934\/revisions"}],"predecessor-version":[{"id":1935,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/posts\/1934\/revisions\/1935"}],"wp:attachment":[{"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/media?parent=1934"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/categories?post=1934"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/c002.minisoft.com\/support\/wp-json\/wp\/v2\/tags?post=1934"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}