Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Easy questions about Auto Save

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Easy questions about Auto Save

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Easy questions about Auto Save

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Easy questions about Auto Save

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
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
A lot of easy questions. filo666 Excel Programming 5 April 22nd 05 12:35 AM
two easy questions take two brianelson Excel Programming 1 March 1st 04 05:18 AM
Two Easy questions BrianElson Excel Programming 0 February 29th 04 11:51 PM
Two really easy questions James[_9_] Excel Programming 3 July 16th 03 07:00 PM


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