Dear All
i have a file on E:\bee55\DailyReport.xls
i have this code
Private Sub CopyFile_Click()
Dim strPath As String
Dim date1 As String
date1 = Format(CDate(Date), "yyyy-mm-dd/ hh:mm:ss") & ".xls"
strpath = "E:\bee55\Daily Report"
FileCopy "E:\bee55\DailyReport.xls", strpath & date1
End Sub
when i excute this code an error occur say: file not found
i try to change the following line:
date1 = Format(CDate(Date), "yyyy-mm-dd/ hh:mm:ss") & ".xls"
to:
date1 = "11/3/1981" & ".xls"
it success and the file was copy with name: DailyReport11/3/1981.xls
my issu is to assign current date to the file name
have any body experience so ??
great thanks,
i have a file on E:\bee55\DailyReport.xls
i have this code
Private Sub CopyFile_Click()
Dim strPath As String
Dim date1 As String
date1 = Format(CDate(Date), "yyyy-mm-dd/ hh:mm:ss") & ".xls"
strpath = "E:\bee55\Daily Report"
FileCopy "E:\bee55\DailyReport.xls", strpath & date1
End Sub
when i excute this code an error occur say: file not found
i try to change the following line:
date1 = Format(CDate(Date), "yyyy-mm-dd/ hh:mm:ss") & ".xls"
to:
date1 = "11/3/1981" & ".xls"
it success and the file was copy with name: DailyReport11/3/1981.xls
my issu is to assign current date to the file name
have any body experience so ??
great thanks,