Dim vFile As Variant
vFile = Application.GetSaveAsFilename(InitialFileName:=Sheets("SIMPLE").Cells(2, 2) & "_config.yaml",FileFilter:="YAML Config File (*.yaml), *.xlsb, All files (*.*), *.*",Title:="Save Config File As:")
If vFile <> False Then
Call saveFile(vFile, yaml)
MsgBox ("File Saved")
End If
End Sub
Sub saveFile(fileName As Variant, content As String)
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim oFile As Object
Set oFile = fso.CreateTextFile(fileName)
oFile.WriteLine content
oFile.Close
Set fso = Nothing
Set oFile = Nothing
End Sub