Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Create new workbook

How would I create a new work book and name it from an active workbook name
& todays date?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Create new workbook

Sub test()
Dim strFileName As String

strFileName = ActiveWorkbook.Name
If Right(strFileName, 4) = ".xls" Then
strFileName = Left(strFileName, Len(strFileName) - 4)
End If

With Workbooks.Add
.SaveAs strFileName & Format(Date, "yyyymmdd")
.Close
End With
End Sub


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Kevin G" wrote in message
news:E9kUb.8505$An3.154@edtnps84...
How would I create a new work book and name it from an active workbook

name
& todays date?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I Use VBA to Create New Workbook Without Links? Pausert of Nikkeldepaiin Excel Discussion (Misc queries) 3 March 28th 08 01:42 PM
Create workbook JereNet Excel Discussion (Misc queries) 1 March 21st 08 02:20 AM
Create New Workbook from Worksheets in One Workbook Dave Excel Discussion (Misc queries) 4 June 17th 07 10:27 PM
Taking specific rows from on workbook to create another workbook Michelle Excel Worksheet Functions 1 May 12th 07 04:54 AM
help! create master workbook Sarah Excel Discussion (Misc queries) 0 January 19th 07 11:36 PM


All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"