
Sub Salva_File()
Dim mypath As String
Dim nFile As String
nFile = Range("A1").Value ' Inserire il nome del file da salvare = MCM - S0855.xls
mypath = Range("A2").Value ' Inserire il nome del percorso desiderato = C:UsersmassimoDownloadsRilievi
ActiveWorkbook.SaveAs Filename:=mypath & nFile & ".xls", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
MsgBox ("File salvato con successo."), vbInformation, " Prova Salvataggio"
End Sub |
