#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default File Names

I am trying to create a backup file using an autoexec macro, but am
unable to find the command to put in the macro to create the file name.

I need to have the file name auto-incremental depending on what name is
in the folder.

Could anyone also tell me how to create the file name as the current
date..

Thanks.

Reply »

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 341
Default File Names

Hello Chris,

How about this. It doesn't go and look in the folder for what is already
there, but it saves your active workbook as for example "BACKUP 080629.xls"
inside the folder you specify.

If you really want to get it to look in the folder to see what is there,
then add one, post the question under excel programming.

ActiveWorkbook.SaveAs Filename:="\\SERVER\FOLDER\"BACKUP" & Format(Year(Now)
- 2000, "00") & Format(Month(Now), "00") & Format(Day(Now), "00") & ".xls"


HTH
---
Allllen

--
Allllen


" wrote:

I am trying to create a backup file using an autoexec macro, but am
unable to find the command to put in the macro to create the file name.

I need to have the file name auto-incremental depending on what name is
in the folder.

Could anyone also tell me how to create the file name as the current
date..

Thanks.

Reply »


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
changing file names saybut Excel Discussion (Misc queries) 2 February 20th 06 03:49 PM
Sorting file names Gordon Excel Discussion (Misc queries) 4 November 30th 05 02:33 AM
copy file names covi2k2 Excel Discussion (Misc queries) 3 November 17th 05 02:19 PM
Links picking up values from an older version of linked file Cate Links and Linking in Excel 4 October 20th 05 01:53 PM
need to copy a long list of file names gilcola Excel Discussion (Misc queries) 6 August 19th 05 12:55 AM


All times are GMT +1. The time now is 03:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"