Forum Discussion
Importing CSV files with VBA Excel
Yes, it's possible to import CSV files into your worksheets. Though I'm afraid I don't follow why you want to read the filenames into a listbox first (you could add a command button to a worksheet and just get the filenames and copy the data in)?
I attached a file with a userform and some basic code to read filenames into a listbox. Also, I added a button to import two files. Though these two buttons are, at present, independent of each other (the import button will also have you browse for the files - I don't know what mechanism you plan to use for the import function to open the files since the listbox will only have the file name and not the path).
Hello JMB17,
Thanks for your reply, and thanks for your file. I will visualize it as soon as I have time (working this week, I might have a lot of work).
I keep you informed of the continuation.
For my 2nd question, it was just to show only the file names in ListBox, to make it more intuitive for my workteam. But if that is not possible, it's not important.