Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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/



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
Help getting output value from another sheet [email protected] Excel Discussion (Misc queries) 1 January 15th 08 09:49 AM
Hyperlink to another sheet within a workbook using formula Christopher Watson Excel Worksheet Functions 1 September 28th 07 11:24 AM
Bring one sheet from one workbook to another via formula Fgbdrum Excel Discussion (Misc queries) 1 November 28th 06 09:18 PM
how can I paste to a different workbook without formula refrencing the original sheet [email protected] New Users to Excel 3 May 29th 06 11:50 AM
How to output recordset data to sheet Terence[_2_] Excel Programming 0 July 28th 03 07:36 AM


All times are GMT +1. The time now is 03:05 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"