Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have macros that record where the file is being saved to. How would I add
todays date in the file name. I've tried using =today() and that didn't work for me. Is this even possible? Thanks so much |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Dim FName As String FName = ThisWorkbook.Path & "\Test_" & Format(Now, "dd-mmm-yyyy") & ".xls" ThisWorkbook.SaveAs FName -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "JOUIOUI" wrote in message ... I have macros that record where the file is being saved to. How would I add todays date in the file name. I've tried using =today() and that didn't work for me. Is this even possible? Thanks so much |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI Chip,
Can you take a look at this and let me know what I'm doing wrong. I'm getting a Run time error 438, Object doesn't support this property or method. ChDir "S:\Assets\All_Records_Access_Table" Dim FName As String FName = ActiveWorkbook = "S:\Assets\Joyce\All_Records_Access_Table\All Records" & Format(Now, "dd-mmm-yyyy") & ".xls" ThisWorkbook.SaveAs FName "Chip Pearson" wrote: Try Dim FName As String FName = ThisWorkbook.Path & "\Test_" & Format(Now, "dd-mmm-yyyy") & ".xls" ThisWorkbook.SaveAs FName -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "JOUIOUI" wrote in message ... I have macros that record where the file is being saved to. How would I add todays date in the file name. I've tried using =today() and that didn't work for me. Is this even possible? Thanks so much |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The problem is with the ActiveWorkbook object when you assign a
value to FName. It shouldn't be there. FName = "S:\Assets\Joyce\All_Records_Access_Table\All Records" & _ Format(Now, "dd-mmm-yyyy") & ".xls" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "JOUIOUI" wrote in message ... HI Chip, Can you take a look at this and let me know what I'm doing wrong. I'm getting a Run time error 438, Object doesn't support this property or method. ChDir "S:\Assets\All_Records_Access_Table" Dim FName As String FName = ActiveWorkbook = "S:\Assets\Joyce\All_Records_Access_Table\All Records" & Format(Now, "dd-mmm-yyyy") & ".xls" ThisWorkbook.SaveAs FName "Chip Pearson" wrote: Try Dim FName As String FName = ThisWorkbook.Path & "\Test_" & Format(Now, "dd-mmm-yyyy") & ".xls" ThisWorkbook.SaveAs FName -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "JOUIOUI" wrote in message ... I have macros that record where the file is being saved to. How would I add todays date in the file name. I've tried using =today() and that didn't work for me. Is this even possible? Thanks so much |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
A lot of easy questions. | Excel Programming | |||
two easy questions take two | Excel Programming | |||
Two Easy questions | Excel Programming | |||
Two really easy questions | Excel Programming |