Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually you don't need an api call.
You can eith shell a command to run a batch file or, amd more easily, drom an inet control onto a userform. The following code can be used to send a file...it first calls a procedure to open a channel, then sends the file Private Sub SendFile() '...prepare OpenChannelToFTP ' see below With INetControl ' name of the inet control on form '...execute mbSent = False .Execute , "PUT " & msSourceFile & " " _ & TargetFile mbSent = True '...wait Do DoEvents Loop While .StillExecuting '...close .Execute , "Close" End With End Sub The following procedure is called to open an FTP channel and sets a target folder.... Private Sub OpenChannelToFTP() With INetControl .Protocol = ProtocolConstants.icFTP .URL = URL .UserName = Login .Password = Password .Execute , "CD " & TargetPath '...wait Do DoEvents Loop While .StillExecuting End With End Sub I use named variables that are pretty much self- describing. Note: the variable 'mSent' is boolean and set in the forms General area - is its scope is the code module. This is set by by the sending procedure - I use it later to test if a send worked. I also have the "statechanged" event of the inet control coded to test the ftp responses. So, you can see that this is an extremely easy-to-use interface. Patrick Molloy Microsoft Excel MVP -----Original Message----- Need help on how to use excel vba to download file via ftp(or other means) from another system(specifically, openVMS alpha system). Would this also be possible to input command to this system? using excel as the medium. Need to have an interface that could be user friendly and would not worry about the syntax being used on the openVMA system. thank you very much --- Message posted from http://www.ExcelForum.com/ . |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
download file of 200 name, addr.etc to excel file - how? please ad | Excel Worksheet Functions | |||
File Download Question | Excel Discussion (Misc queries) | |||
HELP----Can't get a CSV file to download onto my PC | New Users to Excel | |||
download a .csv file to Excel | Excel Discussion (Misc queries) | |||
I need to download an exel spreadsheet file. (file extension :xls) | Excel Discussion (Misc queries) |