creating workbooks and worksheets automatically from existing ss

  • Thread starter Thread starter Neil
  • Start date Start date
N

Neil

I want to create (seperately)a new workbook and a new
worksheet automatically each business day.

I want to name them for the day created.

Can this be done?

Can you help?
 
I'm not quite sure how you create the workbooks, but you could modify this:

Option Explicit
Sub testme01()

Dim myPath As String
Dim wkbk As Workbook

myPath = "C:\my documents\excel\test"
If Right(myPath, 1) <> "\" Then
myPath = myPath & "\"
End If

Set wkbk = Workbooks.Add
'do some stuff

wkbk.SaveAs Filename:=myPath & Format(Date, "yyyy_mm_dd"), _
FileFormat:=xlNormal

wkbk.close savechanges:=false 'close the workbook????

End Sub
 
Back
Top