Pessoal, estou quase lá...
Sub SaveAsName()
Dim save_as As Variant
Dim file_name As String
Dim ProgramName As String
file_name = Range("S1").Value
' Get the file name.
save_as = Application.GetSaveAsFilename(Range("S1").Value, _
FileFilter:="Excel Files,*.xlsx,All Files,*.*")
' See if the user canceled.
If save_as = False Then Exit Sub
' Save the file with the new name.
Application.DisplayAlerts = False
If LCase$(Right$(save_as, 4)) <> ".xlsxm" Then
file_name = save_as & ".xlsxm"
End If
ActiveWorkbook.SaveAs FileName:=save_as, FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub
Porém, salva em formato Excel e não em formato com macro...
Postado : 27/07/2016 10:03 am