I have been working on several user-forms and have a command to write the resulting string to a text file. However the issue I run into is one where I have a hardcoded shell command that I need to work on any computer.
myFile = "C:\Reformatted.txt"
Open myFile For Output As #1
Print #1, UserEntry 'Write string to the file.
Close #1
Shell "C:\Windows\Notepad.exe C:\Reformatted.txt", 1 'Opens up the text file.
The issue here as you can see is that while every computer (all windows) will have notepad, they wont be in the same filepath. In addition different computers and users will want to save it in different folders.
I want to use this:
Application.GetSaveAsFilename
How can I make it to write to the txt file?
Any tips?