
Sub salva_xlsx() Dim Path As String, Nome As String Path = ThisWorkbook.Path & "" Nome = Left(ThisWorkbook.Name, InStr(ThisWorkbook.Name, ".") - 1) & "_" & Day(Date) & "_" & Month(Date) & "_" & Year(Date) & ".xlsx" Application.DisplayAlerts = False ThisWorkbook.SaveCopyAs Filename:=Path & Nome ActiveWorkbook.SaveAs , CreateBackup:=False Application.DisplayAlerts = True ActiveWorkbook.Close End Sub |
Sub Macro1()
'
' Macro1 Macro
' Macro registrata il 23/12/2014 da Ibm T43
'
'
ActiveWorkbook.SaveAs Filename:= _
"C:Documents and SettingsIbmT43DesktopDropboxNuova cartellaConsumi benzina Harley Davidson Sportster Xl 1200 R Roadstar 2.xlsx" _
, FileFormat:=51, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub |
Sub salva_xlsx() Dim Path As String, Nome As String Path = ThisWorkbook.Path & "" Nome = Left(ThisWorkbook.Name, InStr(ThisWorkbook.Name, ".")) & "xlsx" 'Application.DisplayAlerts = False ActiveWorkbook.SaveAs , CreateBackup:=False 'qui salvo il file corrente ActiveWorkbook.SaveAs Filename:=Path & Nome, FileFormat:=51, ReadOnlyRecommended:=False, CreateBackup:=False ' qui salvo la copia xlsx 'Application.DisplayAlerts = True ActiveWorkbook.Close ' non posso mettere d'uscire da excel (perchè se hai altri file aperti li chiude tutti) End Sub |
Sub Workbook_BeforeClose() Dim Path As String, Nome As String Path = ThisWorkbook.Path & "" Nome = Left(ThisWorkbook.Name, InStr(ThisWorkbook.Name, ".")) & "xlsx" 'Application.DisplayAlerts = False ActiveWorkbook.SaveAs , CreateBackup:=False 'qui salvo il file corrente ActiveWorkbook.SaveAs Filename:=Path & Nome, FileFormat:=51, ReadOnlyRecommended:=False, CreateBackup:=False ' qui salvo la copia xlsx 'Application.DisplayAlerts = True ActiveWorkbook.Close ' non posso mettere d'uscire da excel (perchè se hai altri file aperti li chiude tutti) End Sub |
Sub Auto_Close() Dim Path As String, Nome As String Path = ThisWorkbook.Path & "" Nome = Left(ThisWorkbook.Name, InStr(ThisWorkbook.Name, ".")) & "xlsx" Application.DisplayAlerts = False ActiveWorkbook.SaveAs , CreateBackup:=False 'qui salvo il file corrente ActiveWorkbook.SaveAs Filename:="C:Documents and SettingsIbm T43DocumentiDropboxNuova cartellaVecchia", FileFormat:=51, ReadOnlyRecommended:=False, CreateBackup:=False ' qui salvo la copia xlsx Application.DisplayAlerts = True ActiveWorkbook.Close ' non posso mettere d'uscire da excel (perchè se hai altri file aperti li chiude tutti) End Sub |
Sub Auto_Close() Dim Path As String, Nome As String Path = ThisWorkbook.Path & "" Nome = Left(ThisWorkbook.Name, InStr(ThisWorkbook.Name, ".")) & "xlsx" Application.DisplayAlerts = False ActiveWorkbook.SaveAs , CreateBackup:=False 'qui salvo il file corrente 'ActiveWorkbook.SaveAs Filename:=Path & Nome, FileFormat:=51, ReadOnlyRecommended:=False, CreateBackup:=False ' qui salvo la copia xlsx nella stessa cartella del file xls ActiveWorkbook.SaveAs Filename:="C:Documents and SettingsIbm T43DocumentiDropboxNuova cartellaVecchia" & Nome & "", FileFormat:=51, ReadOnlyRecommended:=False, CreateBackup:=False ' qui salvo la copia xlsx in una determinata cartella Application.DisplayAlerts = True ActiveWorkbook.Close ' non posso mettere d'uscire da excel (perchè se hai altri file aperti li chiude tutti) End Sub |
Sub Macro1()
'
' Macro1 Macro
' Macro registrata il 29/12/2014 da Ibm T43
'
'
Sheets("Spese Mensili").Select
ActiveWorkbook.Save
End Sub |
Sub Auto_Close() Dim Path As String, Nome As String Path = ThisWorkbook.Path & "" Nome = Left(ThisWorkbook.Name, InStr(ThisWorkbook.Name, ".")) & "xlsx" 'Application.DisplayAlerts = False ActiveWorkbook.Save 'qui salvo il file corrente ActiveWorkbook.SaveAs Filename:=Path & Nome, FileFormat:=51, ReadOnlyRecommended:=False, CreateBackup:=False ' qui salvo la copia xlsx 'Application.DisplayAlerts = True ActiveWorkbook.Close ' non posso mettere d'uscire da excel (perchè se hai altri file aperti li chiude tutti) End Sub |
