I am tying to save a # of files by the date of the file.
I am using the following script :
Range("a2").Select
ActiveCell.FormulaR1C1 = "=YEAR(_rptPubDate)"
Range("b2").Select
ActiveCell.FormulaR1C1 = "=MONTH(_rptPubDate)"
Range("c2").Select
ActiveCell.FormulaR1C1 = "=DAY(_rptPubDate)"
Range("a2").Select
Selection.NumberFormat = "0000"
Range("b2").Select
Selection.NumberFormat = "00"
Range("c2").Select
Selection.NumberFormat = "00"
Range("d2").Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(RC[-3],"" "",RC[-2],"" "",RC[-1],"" "",""br_Ems"")"
Fname = Range("d2")
ActiveWorkbook.SaveAs FileName:=Fname
ActiveWorkbook.Close
The problem is that it reads the date (01/05/2003)
& saves it as (2003 1 5 br_ems)
when what I Realy want is (2003 01 05 br_ems).
any suggestions?
I am using the following script :
Range("a2").Select
ActiveCell.FormulaR1C1 = "=YEAR(_rptPubDate)"
Range("b2").Select
ActiveCell.FormulaR1C1 = "=MONTH(_rptPubDate)"
Range("c2").Select
ActiveCell.FormulaR1C1 = "=DAY(_rptPubDate)"
Range("a2").Select
Selection.NumberFormat = "0000"
Range("b2").Select
Selection.NumberFormat = "00"
Range("c2").Select
Selection.NumberFormat = "00"
Range("d2").Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(RC[-3],"" "",RC[-2],"" "",RC[-1],"" "",""br_Ems"")"
Fname = Range("d2")
ActiveWorkbook.SaveAs FileName:=Fname
ActiveWorkbook.Close
The problem is that it reads the date (01/05/2003)
& saves it as (2003 1 5 br_ems)
when what I Realy want is (2003 01 05 br_ems).
any suggestions?