Nicola
06-19-2006, 08:31 PM
Ciao,
Code saves ?name?joining of cells A4 + A5 of Sheet ?Shevo? and date:
To produce: Parita64A09 06-06-19
a) Is clearer to read: Parita 64A09 (06-06-19)
b) Clearer: Parita 64A09 (06-06-19 / hh.mm.ss) ?and time?
Sub FareIl()
Dim NewFileName As String
Dim StartWkBk As Workbook
Dim strDate As String
Set StartWkBk = ActiveWorkbook
NewFileName = Sheets("Milano").Range("A4").Text & Sheets("Milano").Range("A5").Text
'Date File
strDate = Format(Now, " yy-mm-dd ")
With StartWkBk
.Sheets(Array("Milano", "Bologna", "Firenze", "Bari")).Copy
ActiveSheet.Select
ActiveWorkbook.SaveAs Filename:=Fld & NewFileName & strDate & ".xls"
End With
ActiveWorkbook.Close SaveChanges:=False
End Sub
Any help to achieve, if possible?? a) or b) ?? : pray2:
Grazie,
Nicola
Code saves ?name?joining of cells A4 + A5 of Sheet ?Shevo? and date:
To produce: Parita64A09 06-06-19
a) Is clearer to read: Parita 64A09 (06-06-19)
b) Clearer: Parita 64A09 (06-06-19 / hh.mm.ss) ?and time?
Sub FareIl()
Dim NewFileName As String
Dim StartWkBk As Workbook
Dim strDate As String
Set StartWkBk = ActiveWorkbook
NewFileName = Sheets("Milano").Range("A4").Text & Sheets("Milano").Range("A5").Text
'Date File
strDate = Format(Now, " yy-mm-dd ")
With StartWkBk
.Sheets(Array("Milano", "Bologna", "Firenze", "Bari")).Copy
ActiveSheet.Select
ActiveWorkbook.SaveAs Filename:=Fld & NewFileName & strDate & ".xls"
End With
ActiveWorkbook.Close SaveChanges:=False
End Sub
Any help to achieve, if possible?? a) or b) ?? : pray2:
Grazie,
Nicola