Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi,
I have the code below that will create a new worksheet and rename it after todays date. However if the user trys to create a log again , ie for the same day, I get this error:- Run-time error 1004 cannot rename a sheet to the same name as another sheet, a referenced object or a workbook referenced by visual basic. Oh course what I want is a msg box advising the user that one already exsists ans asking if they wanna view it. the code I have Sub Create_log() Application.ScreenUpdating = False With Sheets("Log master") .Visible = True .Copy After:=Sheets(Sheets.Count) ActiveSheet.Name = Format(Date, "DDMMM") .Visible = False End With Application.ScreenUpdating = True End Sub any help appreciated |