Sub Build() Dim yaml as string yaml = "FieldMapping.Config:" & vbCrLf & yaml 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 $1.Close(False) Set fso = Nothing Set oFile = Nothing End Sub -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted