I have created a spreadsheet for about 30-40 users that imports a text file and does some other manual calculations. Below is part of the code that imports the text file.
At least once a week I receive an email from a user indicating the macro doesn’t work and they keep getting an error. The problem with the code is really three-fold.
1-The text file that is imported must always be named “text_file.txt”
2-The text file must always be saved to the desktop
3-The user file must always be called “ClientList.xls”
I am finding out that when they import the text file they are not saving to the desktop. Instead they save to the O: drive, the C: drive, to a personal folder, etc. I also discovered they have renamed the user file to “Client”, or “ClientNames”, or “ListofClients”, etc. They are also renaming the text file.
I really need to modify this code so that when the user imports the text file, these errors do not occur.
How would I modify the code so that when prompted to import data, the user can actually choose the file they wish to import (like when you open a file in Excel)? I want to give the user the ability to choose the path name and file name.
Also, the txt file that is used is separated by “|”. I have attached a sample of user file and text file used if needed.
I hope this explanation isn’t overkill. Thanks of any assistance
Bookmarks