Forum Discussion
Import CSV from listbox in userform
Enclosed in your file is a different approach, is simpler and can easily be used again and again.
Button: Nikolinos Proposal Import CSV File
I would be happy to know if I could help.
I wish you continued success with Excel
Nikolino
I know I don't know anything (Socrates)
* Kindly Mark and Vote any reply if it helps please, as it will be beneficial to more Community members reading here.
- MortenK77Feb 25, 2021Copper Contributor
I have tested your solution before, but there are several who will use this workbook. So I want to retrieve the files via this userform and listbox to prevent unwanted events.
- NikolinoDEFeb 26, 2021Platinum Contributor
The error is in the line marked in red because you obviously do not have this path
SubFolderName = "E:\ICP-Smartmål\Ny fil fra ICP"
Fixed it a bit and when I entered my path it worked.
Enclosed the file, adjust the path on your pc and it will work.
Don't forget to enter enough backslash, including at the end.
I would be happy to know if I could help.
Nikolino
I know I don't know anything (Socrates)
- MortenK77Feb 26, 2021Copper Contributor
Thank's, it's a step in right direction, but I still struggling to import the selected csv file from the listbox to a new sheet1 in my open woorkbook. I hope a good code under the import file button will import the file.