Hi,
I have created a batch file to copy a csv file from a remote server to my desktop which works fine when I execute it.
I want to invoke that batchfile using excel macro which is as follows:
Sub ftp_file()
Dim getfile As Double
getfile = Shell("c:\folder\needtorun.bat", vbNormalFocus)
End Sub
It does not copy the required file to the destination. I have re checked my batchfile and it has no issues when run independently.
One of the possibility could be, exel macro does not wait until the ftp is complete. How can I check at which step the problem is occuring? How can I go about it?
Has anybody tackled the similar issue before? Any help is appreciated.
Thanks in advance!
Moderator Note:
Pls use code tags around your code next time as per forum rules.
Bookmarks