ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   creating workbooks and worksheets automatically from existing ss (https://www.excelbanter.com/excel-programming/272672-creating-workbooks-worksheets-automatically-existing-ss.html)

Neil[_10_]

creating workbooks and worksheets automatically from existing ss
 
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?





Dave Peterson[_3_]

creating workbooks and worksheets automatically from existing ss
 
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


Neil wrote:

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?


--

Dave Peterson



All times are GMT +1. The time now is 09:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com