K Kevin G Feb 5, 2004 #1 How would I create a new work book and name it from an active workbook name & todays date?
R Rob van Gelder Feb 5, 2004 #2 Sub test() Dim strFileName As String strFileName = ActiveWorkbook.Name If Right(strFileName, 4) = ".xls" Then strFileName = Left(strFileName, Len(strFileName) - 4) End If With Workbooks.Add .SaveAs strFileName & Format(Date, "yyyymmdd") .Close End With End Sub
Sub test() Dim strFileName As String strFileName = ActiveWorkbook.Name If Right(strFileName, 4) = ".xls" Then strFileName = Left(strFileName, Len(strFileName) - 4) End If With Workbooks.Add .SaveAs strFileName & Format(Date, "yyyymmdd") .Close End With End Sub