View Single Post
  #3   Report Post  
Anthony
 
Posts: n/a
Default

Great -it worked
can I ask another question
if a log for 'today' has already been created, what code do I (well you!)
need to add to advise the user of this, and a message box asking them if they
want to view it,then being taken there if required.,
thanks again

"KL" wrote:

Hi,

try this:

Sub Create_log()
Application.ScreenUpdating = False
With Sheets("Log master")
.Visible = True
.Copy After:=Sheets(Sheets.Count)
ActiveSheet.Name = Format(Date, "YYYY-MM-DD")
.Visible = False
End With
Application.ScreenUpdating = True
End Sub

Regards,
KL


"Anthony" wrote in message
...
Hi,
I have been given the code below which will enable a user to create a new
worksheet from a copy of one stored in my workbook.
What I require is once the new sheet has been created - rename it as
todays
date.
ie user clicks on the 'create todays log' button, a copy of my master
sheet
is shown and this newly created worksheet is now renamed after todays
date.
hope you can help - and go easy as I'm new to this.
many thanks

Sub Create_log()
Sheets("Log master").Visible = True
Sheets("Log Master").Copy After:=ActiveSheet
'ActiveSheet.Name =
Sheets("Log Master").Visible = False
End Sub