I am trying to get this code to save to the directory where the file was opened. At current it manages to save the file by cel text but by default wants to save in c:/my documents.
This is what i have so far and have no idea where to add ThisWorkbook.Path
Sub Save()
Dim flToSave As Variant
Dim flName As String
Dim flFormat As Long
flFormat = ActiveWorkbook.FileFormat
flName = Range("A1") & Range("A2").Text
flToSave = Application.GetSaveAsFilename _
(flName, filefilter:="Excel Files (*.xlsm), *.xlsm", _
Title:="Save FileAs...")
If flToSave = False Then
Exit Sub
Else
Thisworkbook.SaveAs Filename:=flToSave, FileFormat:=flFormat
End If
End Sub
Change your
GetSaveAsFilenametoThis starts the
SaveAsin the specified directory