Victor Charles
asked on
Help with choosing path to save file
Hi,
I'm using the code below to save my xml file to a specific path. How do I modify the code
to open a dialog box and give the users option to save the file in the path they choose.
dtsetFiles.WriteXml(Applic ation.Star tupPath & "\LinkFiles\LinkFinal" & Trim(LoginForm1.username.T ext) & ".xml")
Thanks,
Victor
I'm using the code below to save my xml file to a specific path. How do I modify the code
to open a dialog box and give the users option to save the file in the path they choose.
dtsetFiles.WriteXml(Applic
Thanks,
Victor
ASKER
Hi,
Thanks for the information. the code creates the filename with code below (i.e. LinkFinalBEL.xml), I need to open a dialog box to give the user an option where to save it.
dtsetFiles.WriteXml(Applic ation.Star tupPath & "\LinkFiles\LinkFinal" & Trim(LoginForm1.username.T ext) & ".xml")
Victor
Thanks for the information. the code creates the filename with code below (i.e. LinkFinalBEL.xml), I need to open a dialog box to give the user an option where to save it.
dtsetFiles.WriteXml(Applic
Victor
ASKER
Hi,
After saving the data to my application's folder, how do I open a dialog box with the filename already included so users can choose another location to save it,
Victor
After saving the data to my application's folder, how do I open a dialog box with the filename already included so users can choose another location to save it,
Victor
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi,
Thanks for the code. How do you test if the file exist before you execute the code.
Victor
Thanks for the code. How do you test if the file exist before you execute the code.
Victor
If System.IO.File.Exists(strF ileName)
ASKER
Thanks
Please note that if you normally install your application in the C:\Program Files folder tree, you should not store any files that are going to change in the installation folder or a subfolder. As of Windows 7, this folder tree is locked down, and you have to provide administrator privileges in response to User Access Control any time you want to make a change. It's better to use a folder like C:\ProgramData (take a look at My.Computer.FileSystem.Spe