Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 683
Default save workbook as the date content of a cell within a sheet

Hello,
Ron de Bruin helped me with this formula and thank you Ron.

ActiveWorkbook.SaveCopyAs "Patrol Log " & Format(Now, "mm-dd-yy h-mm-ss") &
".xls"

This saves the workbook upon exit with the current date but actually I would
like the date that is entered into cell b8 of sheet 1 to be the file name
saved.
ex: the phrase (Patrol Log) and the content of sheet 1 cell B8 (11-1-04)
Patrol Log 11-1-04. Right now with the formula above, it is saving the
workbook to the my documents folder. Can it be made to save to a different
folder of my choosing?

Thanks
Brian
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default save workbook as the date content of a cell within a sheet

Hi Brian

Try this

Sub test()
With ActiveWorkbook
.SaveCopyAs "C:\Patrol Log " & _
Format(.Sheets("Sheet1").Range("B8"), "mm-dd-yy") & ".xls"
End With
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Brian" wrote in message ...
Hello,
Ron de Bruin helped me with this formula and thank you Ron.

ActiveWorkbook.SaveCopyAs "Patrol Log " & Format(Now, "mm-dd-yy h-mm-ss") &
".xls"

This saves the workbook upon exit with the current date but actually I would
like the date that is entered into cell b8 of sheet 1 to be the file name
saved.
ex: the phrase (Patrol Log) and the content of sheet 1 cell B8 (11-1-04)
Patrol Log 11-1-04. Right now with the formula above, it is saving the
workbook to the my documents folder. Can it be made to save to a different
folder of my choosing?

Thanks
Brian



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
Requiring Cell Content on Save The Chad Excel Discussion (Misc queries) 1 July 3rd 08 12:06 AM
Looking for a Macro or other tool to create a Workbook Content Sheet Victor[_2_] Excel Discussion (Misc queries) 1 February 7th 08 03:31 PM
sheet tab = to cell content reaa Excel Discussion (Misc queries) 5 February 26th 07 07:06 PM
Select sheet tabs in workbook & save to separate workbook files stratocaster Excel Worksheet Functions 2 March 1st 06 03:35 PM
Save as using cell content in file name NickMinUK Excel Programming 1 June 15th 04 10:06 AM


All times are GMT +1. The time now is 11:38 AM.

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

About Us

"It's about Microsoft Excel"