Hi, TBO,
could you be kind enough to explain the diference between ActivbeWorkbook and ThisWorkbook to me as you let the active workbook save, alter the active workbook via ClearContents and then save ThisWorkbook (workbook with code)?
Private Sub CommandButton1_Click()
On Error GoTo ErrorHandler
Range("A8:F308").ClearContents
With ActiveWorkbook
.SaveAs Filename:=.Path & "\" & Range("L4") & " " & Range("N4"), FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End With
ErrorHandler: 'last command in this procedure, procedure will exit automaticly
End Sub
Ciao,
Holger
Bookmarks