Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default This might be a toughy

My customer invoices are being made out by various people using excel.
When saving the invoices I've asked them to add the current date to the
filename when saving it,
such as AAA607 PLUS CURRENT DATE.
Problem is they enter the dates in different formats.
e.g. aaa6071107, aaa607010107, aaa6071/1/07, aaa60701/01/07.
Is it possible to get excel to add the current date to the filename
automatically for consistancy and so they can be later retrieved and not
overwritten.

Mac53



  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default This might be a toughy

Why not just put a macro in the before_save event of the ThisWorkbook module
so that it is done when they save. You can even create it so that if they
still continue to try to save another way, their desires are over ridden.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mac53" wrote in message
...
My customer invoices are being made out by various people using excel.
When saving the invoices I've asked them to add the current date to the
filename when saving it,
such as AAA607 PLUS CURRENT DATE.
Problem is they enter the dates in different formats.
e.g. aaa6071107, aaa607010107, aaa6071/1/07, aaa60701/01/07.
Is it possible to get excel to add the current date to the filename
automatically for consistancy and so they can be later retrieved and not
overwritten.

Mac53




  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 2
Default This might be a toughy

Thanks very much for the suggestion, I thought that might have been the way.
Unfortunately, I'm not savy with macros's and would have no idea how to do
that. Learning macros for this one of event is not practicle for me and it
sounds very involved. Do you know of a ready made macro that will do this
and also how to implement it?

Thanks for the reply anyway.

Mac53





"Don Guillett" wrote in message
...
Why not just put a macro in the before_save event of the ThisWorkbook
module so that it is done when they save. You can even create it so that
if they still continue to try to save another way, their desires are over
ridden.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mac53" wrote in message
...
My customer invoices are being made out by various people using excel.
When saving the invoices I've asked them to add the current date to the
filename when saving it,
such as AAA607 PLUS CURRENT DATE.
Problem is they enter the dates in different formats.
e.g. aaa6071107, aaa607010107, aaa6071/1/07, aaa60701/01/07.
Is it possible to get excel to add the current date to the filename
automatically for consistancy and so they can be later retrieved and not
overwritten.

Mac53






  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 470
Default This might be a toughy

I am not savy with macros either, but here is one that someone gave me for
the same purpose you are looking for. You may only need the section that
starts at "ActiveWorkbook". My program will be placed on several computers
so I had to verify that the directory exist. Maybe this will get you pointed
in the right direction. I created a commandbutton that said "SAVE & CLOSE".
If you do not wish to close the workbook, remove the "Application.Quit"
command.

'ROUTINE TO SAVE ORDER AND QUIT (CLOSE) EXCEL
Private Sub CommandButton1_Click()
Dim aDirs
Dim sDir As String
Dim i As Long
aDirs = Split("C:\TESTORDER\SUPPLY ORDERS", "\")
sDir = aDirs(LBound(aDirs))
On Error Resume Next
For i = LBound(aDirs) + 1 To UBound(aDirs)
sDir = sDir & "\" & aDirs(i)
MkDir sDir
Next i
On Error GoTo 0
ActiveWorkbook.SaveAs Filename:=sDir & "\" & Format(Date, "yy-mmdd") & "
ST-2 Order.xls"
Application.Quit
End Sub




"Mac53" wrote:

Thanks very much for the suggestion, I thought that might have been the way.
Unfortunately, I'm not savy with macros's and would have no idea how to do
that. Learning macros for this one of event is not practicle for me and it
sounds very involved. Do you know of a ready made macro that will do this
and also how to implement it?

Thanks for the reply anyway.

Mac53





"Don Guillett" wrote in message
...
Why not just put a macro in the before_save event of the ThisWorkbook
module so that it is done when they save. You can even create it so that
if they still continue to try to save another way, their desires are over
ridden.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mac53" wrote in message
...
My customer invoices are being made out by various people using excel.
When saving the invoices I've asked them to add the current date to the
filename when saving it,
such as AAA607 PLUS CURRENT DATE.
Problem is they enter the dates in different formats.
e.g. aaa6071107, aaa607010107, aaa6071/1/07, aaa60701/01/07.
Is it possible to get excel to add the current date to the filename
automatically for consistancy and so they can be later retrieved and not
overwritten.

Mac53







  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 10,124
Default This might be a toughy

Goto the small excel icon in the upper left of the screen next to Fileright
clickinsert this.
For today, you will get aaa20071116

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim mydate As String
Application.DisplayAlerts = False
mydate = Format(Date, "yyyymmdd")
SaveAs Filename:="aaa" & mydate & ".xls"
Application.DisplayAlerts = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Mac53" wrote in message
...
My customer invoices are being made out by various people using excel.
When saving the invoices I've asked them to add the current date to the
filename when saving it,
such as AAA607 PLUS CURRENT DATE.
Problem is they enter the dates in different formats.
e.g. aaa6071107, aaa607010107, aaa6071/1/07, aaa60701/01/07.
Is it possible to get excel to add the current date to the filename
automatically for consistancy and so they can be later retrieved and not
overwritten.

Mac53




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
Need an expert . . . this is a toughy! ( cell links/format cont Hubitron2000 Excel Discussion (Misc queries) 0 March 17th 06 09:15 PM


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