I want to set both the name and the location for a writeline procedure. I am allowing the user to select the path using a dialog box but can’t seem to set both the name and location w/o getting an error. I am using VS 2010.
strFileLocation = dlgFolderBrowser.SelectedPath
Dim swrExportFile As New StreamWriter(strFileLocation)
Thanks in advance, Josh
I’m not 100% sure this is what you mean, but by name and location; do you mean filename and the directory the file will be in?
If so, you can pass it in as one to the StreamWriter: