creating workbooks and worksheets automatically from existing ss

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?
 
D

Dave Peterson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top