The SaveAs Dialog Box works for me but it is the second part of the code which does not let me save the excel sheet as the filename I have set for it. It saves it as Book 18 etc.
How do I get it to save with the filename I have specified?
Dim Ret
strFileName = ProjID & "_" & TCG '<~~ You can set Default name here
Ret = Application.GetSaveAsFilename(InitialFileName:=strFileName, _
fileFilter:="Excel Files (*.xlsx), *.xlsx", _
FilterIndex:=1, _
Title:="Select Folder and File Name to save Impact Assesment")
If Ret <> False Then
ActiveWorkbook.Save
End If
How do I get it to save with the filename I have specified?
Dim Ret
strFileName = ProjID & "_" & TCG '<~~ You can set Default name here
Ret = Application.GetSaveAsFilename(InitialFileName:=strFileName, _
fileFilter:="Excel Files (*.xlsx), *.xlsx", _
FilterIndex:=1, _
Title:="Select Folder and File Name to save Impact Assesment")
If Ret <> False Then
ActiveWorkbook.Save
End If