I have inherited a workbook that is in need of some maintenance. There is one area where I'm a little stumped.
At the end of the macro I am working on, I need it to save a single sheet as a Text (Tab Delimited) file.
The macro that I inherited contains this:
That pops up a "Save As" dialogue box, but forces the file to be saved as a .xlsx. Since I now want it to be a .txt file, I originally modified it to this:Please Login or Register to view this content.
The .txt that it saves it as, however, is really screwy. Weird characters abound and it isn't formatted the same as if I were to manually open the workbook, click Save As, and choose Text (Tab Delimited) and save the file myself. I don't know why that is, but it appears to be trying to save a whole workbook instead of a sheet?Please Login or Register to view this content.
To see if I could get an output that at least worked, I did this code:
The file that it output with that code is perfect. Formatted correctly, no strange characters, etc.Please Login or Register to view this content.
The problem is that it can't be used in a workbook that will be accessed by multiple users since the file path is different for everyone.
What I'm graciously requesting help with is to have a prompt like the first code provides that allows the user to select where the file will be saved, but have it save in the xlText format that I utilized in the third code.
This would let every user put the file where they want and ensure that the saved file is in the proper format.
I hope this makes sense.
I thank you for your consideration of my dilemma and appreciate all assistance!
See post #10 regarding the fact that this is on Mr. Excel forums (unsolved or unaddressed) and no double-work has been done on this issue.
Bookmarks