+ Reply to Thread
Results 1 to 3 of 3

Text File to Fixed IP Address

  1. #1
    Registered User
    Join Date
    02-27-2004
    Location
    Australia
    Posts
    16

    Exclamation Text File to Fixed IP Address

    Hello

    I am not sure this has been asked in the forum before. I have searched the threads but could not find the solution to my query which is to create a text file from an xls sheet and saved in a given IP address. I know how to create a text file in a local directory using the following procedure

    Open "D:\Mydiectory\Upoad\Textfilename.txt" For Output As #1
    …….

    Print #1
    …….

    Close #1

    But when I changed the directory name to the IP address, I got a bad filename error. I suspected that the slash in IP is facing the wrong direction. The IP is in the format – “ftp://10.12.34.567/ABCD/EF/” Any suggestion will be much appreciated.

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: Text File to Fixed IP Address

    Hi

    I may be wrong but I think you will need to create the text file locally and then use an FTP client to upload the file to the destination. You could use the command-line Windows ftp client for this (should be available if you have at least Windows XP). Go Start>Run and type ftp into the command dialog. If a command line opens up that looks like

    ftp >

    then you have the ftp command line tool available.

    If you can do this, write back and I'll try and help you with the ftp commands required on the command line (don't have much experience with this though). You should be able to execute them via the Shell VBA function, or should be able to create a batch script which you can execute via VBA to do it.

    Richard
    Richard Schollar
    Microsoft MVP - Excel

  3. #3
    Registered User
    Join Date
    02-27-2004
    Location
    Australia
    Posts
    16

    Unhappy Re: Text File to Fixed IP Address

    Hello Richard

    Thanks for the prompt reply. Unfortunately our terminals at work have all locked out the Run command so I can't get to the ftp>.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1