![]() |
Using the output of a formula to name a workbook or sheet
I have a template which I use each week to produce a new workbook.
I name the weekly workbook with a week number generated by a formula dependent on the date of the calculation. How can I "capture" the output of the formula and use it within a Macro to name the workbook each week? Jonathan Grodzinski ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Using the output of a formula to name a workbook or sheet
Public Sub SetWorkbookName()
ThisWorkbook.SaveAs Filename:="C:\myfolder\" & format( _ Worksheets(1).Range("A1").Value,"00") & ".xls", _ fileformat:=xlWorkbookNormal End Sub -- Regards, Tom Ogilvy Jgrodz wrote in message ... I have a template which I use each week to produce a new workbook. I name the weekly workbook with a week number generated by a formula dependent on the date of the calculation. How can I "capture" the output of the formula and use it within a Macro to name the workbook each week? Jonathan Grodzinski ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 10:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com