Currently, this is the process of this macro:
1 - Shows user what file name is going to be
2 - Asks user to select the folder in which file should be saved
3 - On screen is the option for the user to save file in folder they selected
I need step 3 to be replaced with an automatic file save - close, with the file just saved/closed selected on screen.
My problem - I am just not seeing how to make the change.
HELP!!!
Thanks
Sub SaveAnyFile()
MsgBox "Next you will be asked to select the lien folder of the Job Folder to which this invoice pertains. You will not be asked to name the file as that will be automatic so there will be continuity in the file names."
Dim folder, name As String
On Error Resume Next
name = ThisWorkbook.name
With Application.FileDialog(msoFileDialogFolderPicker)
.Title = "Please select a folder"
.AllowMultiSelect = False
.Show
folder = .SelectedItems(1)
End With
name = ThisWorkbook.name & Application.PathSeparator & Sheet1.Range("c11") & " - " & Sheet1.Range("C13") & " - " & Sheet1.Range("$C18") & ".xlsm"
ActiveWorkbook.Close
End Sub
Bookmarks