Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    SELECT FILE FROM A LIST (2000 sr 1)

    (Long piece of code moved to attachment by HansV)

    Hans only you...

    i have a dir with many txt file.

    for example in c:epf:

    T2253_132_01.TXT
    T2253_132_02.TXT
    ....

    is possible to make appear this list of file in a txtbox and after when i slect one of this import this file with this macro:

    code: see attachment

    in this case the variable vFile assuming the name of the file clicked for the import for example...

    vFile = "C:EPFT2253_132_01.TXT"

    I hope of to have been clear...

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: SELECT FILE FROM A LIST (2000 sr 1)

    See the attached demo workbook. Open the Visual Basic Editor to see the code behind the form.

    The list box is filled in the UserForm_Initialize procedure.
    The first command button in the demo only displays a message box with the selected file name. You must replace this with the rest of your code to import the file.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: SELECT FILE FROM A LIST (2000 sr 1)

    sure... you are MEGA GALACTICHS Teacher
    Great...

Posting Permissions

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