Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Location
    Houston, Texas, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Using Excel 2000 with a FTP server (Excel 2000)

    I am attempting to have Excel 2000 automatically open a workbook, saved as a HTM file, from a remote FTP location by using the Windows task scheduler to open a local workbook. The code I

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Excel 2000 with a FTP server (Excel 2000)

    Have you tried using the Password parameter of the Open method? I don't have any way to test it, but the following might work:

    <pre>Sub OpenMyFile()
    Application.DisplayAlerts = False
    Workbooks.Open Filename:="ftp://home.houston.rr.com/MYFile.htm", Password:="MyPassword"
    Application.DisplayAlerts = True
    End Sub
    </pre>

    Legare Coleman

  3. #3
    New Lounger
    Join Date
    Sep 2002
    Location
    Houston, Texas, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Excel 2000 with a FTP server (Excel 2000)

    Legare

    Thanks for your reply. At your suggestion, I did try the password parameter, however it did not get the password to the input box. I have been unable to find an example of how to do what I want Excel to do in my VBA book. Any further suggestions or pointers would be appreciated.

    Tom Peacock

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Excel 2000 with a FTP server (Excel 2000)

    Since I don't have any way to test that here, I am out of suggestions. Hope someone else will jump in.
    Legare Coleman

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Using Excel 2000 with a FTP server (Excel 2000)

    Hi Tom,
    I've never actually used this myself, but when you click on File-Open in Excel and change the Look In box at the top to add/modify FTP locations, you can set userid and password parameters for a specific site there. If you do that first (on the machine in question) can you then open the workbook without supplying the password? (Like Legare, I unfortunately have nothing to test this on!)
    Regards,
    Rory

    Microsoft MVP - Excel

  6. #6
    New Lounger
    Join Date
    Sep 2002
    Location
    Houston, Texas, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Excel 2000 with a FTP server (Excel 2000)

    Rory,

    Thanks too, for your suggestion. Excel conveniently forgets to password when you close it down. I am attempting to automate this so that I can load the file from the FTP server by way of VBA code in local workbook opened using the windows task scheduler. Having searched high and low for an answer, it appears that this is just not possible.

    Thanks again to you and Legare. Anyone else have an idea?

    Tom Peacock

  7. #7
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Excel 2000 with a FTP server (Excel 2000)

    I once tried to do something similar using the DUN Server built into W98. Did not come close to getting it worked out. I have however started transferring files to and from a server for key items required in local spreadsheets with Auto FTP Pro from Primasoft.

    This has some extra parameters that can be set, run an application after the transfer, etc. Have never tried this part of it before, but by and large, it has the most flexible scheduler that I have run across and it works flawlessly for me.
    Attached Images Attached Images

  8. #8
    New Lounger
    Join Date
    Sep 2002
    Location
    Houston, Texas, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Excel 2000 with a FTP server (Excel 2000)

    Thanks for the advice Mike, I'll give it a try.

    Tom Peacock

  9. #9
    Star Lounger
    Join Date
    Aug 2001
    Location
    GA
    Posts
    52
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Using Excel 2000 with a FTP server (Excel 2000)

    Here's some more help from someone who also doesn't know what the exact answer is...
    <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    I think you need to establish the FTP connection first. and then open the file. <img src=/S/confused.gif border=0 alt=confused width=15 height=20> hhmmm...

    1 Setup the environment with a call to InternetOpen.
    2 Connect to the host by calling the InternetConnect function.
    3 Call the FtpGetFile function to get the file.
    4 Close the handles created in Steps 1 and 2, using the InternetCloseHandle function.

    5 Life seems much better now...ohh joy! <img src=/S/joy.gif border=0 alt=joy width=23 height=23>

    The functions are part of the "wininet.dll" library. this is somewhere under your windows folder, like in the system32 folder.

    Here a place that may get you started. It has an example of how to FTP to FTP.MICROSOFT.COM and get a file.
    http://www.15seconds.com/issue/981203.htm

    And as those before me have said, I haven't tried it so YMMV. <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>
    Later,
    Bruce

Posting Permissions

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