Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Force File Name Convention

Is there a way to force a user to save a file in a certain format.

For example the only way they would be able to save the file would be as a
date in the following format. 12-12-05


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Force File Name Convention

Here is one way that saves it as today's date when closed,

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.SaveAs Format(Date, "dd-mm-yy")
End Sub
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

but you probably need to give more details on when you wan t this to happen,
what rules determine that date, etc.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"AD108" wrote in message
...
Is there a way to force a user to save a file in a certain format.

For example the only way they would be able to save the file would be as a
date in the following format. 12-12-05




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Force File Name Convention

Thanks alot, looks like a good lead for what I am working on.
"Bob Phillips" wrote in message
...
Here is one way that saves it as today's date when closed,

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.SaveAs Format(Date, "dd-mm-yy")
End Sub
'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

but you probably need to give more details on when you wan t this to

happen,
what rules determine that date, etc.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"AD108" wrote in message
...
Is there a way to force a user to save a file in a certain format.

For example the only way they would be able to save the file would be as

a
date in the following format. 12-12-05






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
Ghost Links which force Excel to update on File Open ExcelMonkey Excel Programming 1 August 15th 05 01:52 PM
How do I force an Excel macro to ask me which file and directory? Ramius Excel Discussion (Misc queries) 4 January 14th 05 03:26 PM
Force re-open file Jamie[_9_] Excel Programming 1 June 10th 04 12:35 PM
code to force xls file to open after several hours passed helmekki[_10_] Excel Programming 1 June 10th 04 03:04 AM
Force File Read-Only? Ed[_9_] Excel Programming 1 July 21st 03 10:22 PM


All times are GMT +1. The time now is 02:35 PM.

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"