Dynamic Import of CSV files with varying names

Spezh

New member
Local time
Today, 04:48
Joined
Nov 21, 2007
Messages
9
I have had a good search around the forum, but can't find a solution to this one either. Any help, or links to a solution would be appreciated. I'm sure this must have been covered before somewhere.

The csv file with my daily orders (which I am trying to import using the transfertext in a module method) is generated at varying times through the day, and has a different name allocated automatically each time it is produced (though EDI software).

I am using buttons on a form to let inexperienced users import the files, but need to be able to give them the option to browse for the appropriate file each time they want to import.

The files are on our network, and always in the same folder.

Method?


Regards, and thanks in advance for any help.

Adam.
 
Are the only CVS Files the one in the folder? What happens to the file once imported? You could write code that either would display the files for the user to select for importing or if once imported they are deleted, then just write the code to import all the CVS files currently in the folder.
 
Other people use the csv files, so I have no control of how they look, or when they are deleted.

There may also be files in the same folder which I do not want to import. hence I want to give the user the option to browse for the file they need to import..

These things are never simple!
 
Last edited:
If the amount of files is small, list them in a listbox and let the users pick & choose which ones to import... Or just write browse code behind the button. I'd be suprised if their is not an example of how to code it already in this forum. If not let me know and I'll post one tomorrow.
 
Search this forum for older articles on the CommonControl ActiveX control, which includes color select, printer select, file select (for open) file location select (for save), etc... Also, Pat Hartman published some VBA code you could use to call out the FileOpen window. When you do the search, tell it "No time limit" on the age of the articles you wanted to see. I would publish it again myself except my notes aren't handy at the moment.
 

Users who are viewing this thread

Back
Top Bottom