I have a macro that uses the GetSaveAsFilename which is fine except it makes the user type in the file name to save the file. The issue is people mistype the file name which messes up other macros down the line. The file name never changes but the folder location does so the user needs to be able to select the folder to save the file in but the file name will always be "Device Complianc.xlsx". One other thing to note the file they are doing a Save As to has the original format as .xls.
Here is the current code:
Sub sbSaveExcelDialog()
Dim IntialName As String
Dim sFileSaveName As Variant
IntialName = "Device Compliance"
sFileSaveName = Application.GetSaveAsFilename(InitialFileName:=InitialName, fileFilter:="Excel Files (*.xlsx), *.xlsx")
If sFileSaveName <> False Then
ActiveWorkbook.SaveAs sFileSaveName
End If
End Sub
Here is the current code:
Sub sbSaveExcelDialog()
Dim IntialName As String
Dim sFileSaveName As Variant
IntialName = "Device Compliance"
sFileSaveName = Application.GetSaveAsFilename(InitialFileName:=InitialName, fileFilter:="Excel Files (*.xlsx), *.xlsx")
If sFileSaveName <> False Then
ActiveWorkbook.SaveAs sFileSaveName
End If
End Sub