Public Function UserPickFile2Save(Optional pvDir)
Dim strTable As String
Dim strFilePath As String
Dim sDialog As String, sDecr As String, sExt As String
Dim vVal, vFile, vPath
Dim vRet
Dim fd As FileDialog
If IsMissing(pvDir) Then pvDir = "c:\"
vPath = pvDir & vFile
'------------BE SURE TO SET THIS IN VBE menu,TOOLS,REFERENCES---
'reference Microsoft Office XX.0 Object Library
'-----------------------------------
Set fd = Application.FileDialog(msoFileDialogSaveAs) 'msoFileDialogPicker
With fd
.AllowMultiSelect = False
.Title = "Save File AS"
.ButtonName = "Save"
'.Filters.Clear
'.Filters.Add sDecr, sExt
'.Filters.Add "Excel Files", "*.xlsx"
'.Filters.Add "All Files", "*.*"
.InitialView = msoFileDialogViewList 'msoFileDialogViewThumbnail
.InitialFileName = vPath
If .Show = 0 Then Exit Function 'There is a problem
'Save the first file selected
UserPickFile2Save = Trim(.SelectedItems(1))
End With
End Function