ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA code scripts in macro (https://www.excelbanter.com/excel-programming/276739-vba-code-scripts-macro.html)

Eric[_6_]

VBA code scripts in macro
 
Hi,

Can anyone give me some comments or suggestions about
running an FTP command in VBA script. I tried to a macro
in my excel file sending my file directly to my
destination using FTP, here's my code, Why after this code
was performed the next code did not run.

Dim fLOG as string
Dim iBatchCopy as string
Dim cJDay as string
..
..
..
fLOG = App.Path & "\" & "LOG." & cJDay
iBatchCopy = ("cmd /c FTP -s:FTPDATA.DAT 255.255.255.0 " "
" & fLOG)

Call Shell(iBatchCopy, vbHide)
..
..
..
FileCopy myfile, otherfile -- This is not being
performed by vb scripts. WHY?

TIA
Eric





D Patel

VBA code scripts in macro
 
As far as I know your computer name/IP should be the last in command line.
Can you send me the sample FTPDATA.DAT file and tell me what exactly you
want. I can try it and let you know.

Thanks,
Dharmesh Patel


"Eric" wrote in message
...
Hi,

Can anyone give me some comments or suggestions about
running an FTP command in VBA script. I tried to a macro
in my excel file sending my file directly to my
destination using FTP, here's my code, Why after this code
was performed the next code did not run.

Dim fLOG as string
Dim iBatchCopy as string
Dim cJDay as string
.
.
.
fLOG = App.Path & "\" & "LOG." & cJDay
iBatchCopy = ("cmd /c FTP -s:FTPDATA.DAT 255.255.255.0 " "
" & fLOG)

Call Shell(iBatchCopy, vbHide)
.
.
.
FileCopy myfile, otherfile -- This is not being
performed by vb scripts. WHY?

TIA
Eric








All times are GMT +1. The time now is 01:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com