I have this code:
DoCmd.TransferText acExportDelim, , "tblData", "C:\Documents and Settings\Desktop\text.csv"
MsgBox "Conversion/Export completed!", vbInformation, "Export CSV"
Which succesfully create a CSV file from tblData. However, what i would like to be able to do is get the user to select the folder in which they want to save the file in AND select a file name, instead of having the code doing it automatically 'C:\Documents and Settings\Desktop\text.csv'.
I have this code which lets the user select the folder:
Private Sub FindFolder_Click()
Dim spath As String
Folder.Value = ""
'The call can not have a trailing slash, so
'strip it from the path if present
spath = UnqualifyPath((FolderLocation.Value))
'call the function, returning the path
'selected (or blank if cancelled)
Folder.Value = BrowseForFolderByPath(spath)
I hope some one can help me with this matter.