Sub CloseWorkbook() Dim myWorkbook1 As Workbook Set myWorkbook1 = Workbooks.Open(FileName:="C:\Data\SalesData1.xlsx") Range("A1").Value = Format(Date, "ddd mmm dd, yyyy") Range("A1").EntireColumn.AutoFit myWorkbook1.Close SaveChanges:=True End Sub