I'm using VBA to take the contents of a certain range an output it as a text file. The file is actually XML data for upload to another system, so the text file has to have a specific extension, "filename.nrc".
I originally designed it to always save to the Documents folders in the users local profile. Everything works fine on my computer, but I had somebody else test it and we couldn't find the file after it saved. Most users will be logging into a virtual desktop (remote) system, which I think is part of my problem.
Is it possible to modify my existing code to allow the user to select that save location but still output as a *.nrc file? (This is only the "OutPut" portion of my code, not the whole sub.)
As always, any help is greatly appreciated!
I originally designed it to always save to the Documents folders in the users local profile. Everything works fine on my computer, but I had somebody else test it and we couldn't find the file after it saved. Most users will be logging into a virtual desktop (remote) system, which I think is part of my problem.
Is it possible to modify my existing code to allow the user to select that save location but still output as a *.nrc file? (This is only the "OutPut" portion of my code, not the whole sub.)
VBA Code:
FF = FreeFile
Dim FileName As String
FileName = InputBox(Prompt:="Please enter the file name.", Title:="Save file as", Default:="XML_Data_Import_" & Format(Date, "yyyy-mm-dd"))
MsgBox "Your Data Import file will be saved to your Documents folder."
Open Environ("UserProfile") & "\Documents\" & FileName & ".nrc" For Output As #FF
Print #FF, TextOut
Close #FF
As always, any help is greatly appreciated!