Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I'm trying to do a save with a variable filename. I read this might be easier if I set a certain cell to equal the filename that I am looking for and then Dim that as a variable in the code and call on the cell for the name. How do I set a cell to equal something like NS Tues Aug 1st This is what I'm putting in right now that does not work ActiveCell.FormulaR1C1 = "NS " & "=TODAY()-1" I know I am missing a character in there or something, the cell displays as NS =TODAY()-1 I wanted the filename to be something like that, the formatting can change if its easier a different way, but I need "NS" the day of the week, then the month and date. The cell also has to have a "Date-1" or something like that in there since I need it to equal the date from the day before. I want to save this file variably and was going to do something like this Dim filename as string filename = Range("A1") ChDir "D:\My Documents\Temp\" ActiveWorkbook.SaveAs filename:= _ "D:\My Documents\Temp\" & filename, FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ Thanks, ~J -- nbaj2k ------------------------------------------------------------------------ nbaj2k's Profile: http://www.excelforum.com/member.php...o&userid=36480 View this thread: http://www.excelforum.com/showthread...hreadid=567405 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Display yesterday's date but only for weekdays? | Excel Worksheet Functions | |||
Open File with name incorporating ~yesterday's date | Excel Programming | |||
Open file based on yesterday's date | Excel Programming | |||
Setting text as a background in cell | Excel Worksheet Functions | |||
Setting up a date and time stamp in a cell | Excel Programming |