+ Reply to Thread
Results 1 to 5 of 5

Password automation for .RefreshAll when linking to FTP site

  1. #1
    Registered User
    Join Date
    09-30-2012
    Location
    Perth, Australia
    MS-Off Ver
    MSO all versions to 2007
    Posts
    30

    Password automation for .RefreshAll when linking to FTP site

    G'day,

    I am using the .RefreshAll function to update numerous tables of data, which is retrieved from .csv files which reside on an external corporate server.
    The .RefreshAll function is initiated by a worksheet button, but performs exactly the same action as Data ribbons' Refresh All function.
    Please Login or Register  to view this content.
    It works fine as long as the user inputs the correct username and password for the FTP site, when prompted by the ftp log on dialogue.
    The problem arises when they enter an incorrect password, or just click to close. It then produces a runtime error, and opens up the VB editor to debug.
    After the first runtime error, attempting it again will produce the same result unless the application is quit and restarted.

    My preference is to hard code the ftp user/password in VBA to completely automate the process.

    Alternatively create a text box popup instead, prompting them to check their password?


    Any help would be greatly appreciated,

    Muzza68

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Password automation for .RefreshAll when linking to FTP site

    Try something like this...

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-30-2012
    Location
    Perth, Australia
    MS-Off Ver
    MSO all versions to 2007
    Posts
    30

    Re: Password automation for .RefreshAll when linking to FTP site

    Thanks @Alpha,

    Failure notification works correctly with your code, but you still cannot retry the refresh (and thus the ftp log on) without closing down Excel and re-starting.....

  4. #4
    Registered User
    Join Date
    09-30-2012
    Location
    Perth, Australia
    MS-Off Ver
    MSO all versions to 2007
    Posts
    30

    Re: Password automation for .RefreshAll when linking to FTP site

    Does anybody else have any ideas about pushing the password to the ftp process?

  5. #5
    Registered User
    Join Date
    09-30-2012
    Location
    Perth, Australia
    MS-Off Ver
    MSO all versions to 2007
    Posts
    30

    Re: Password automation for .RefreshAll when linking to FTP site

    By the way, this appears to be a known issue with internal ftp links.

    If the login is not successful you cannot try again until excel is re-started.

    edit: just like you cannot use another subsequent ftp address in the same session.......
    Last edited by Muzza68; 11-29-2012 at 01:26 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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