Need some urgent(-ish) advice from an MVP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a lot of information that I send to a spreadsheet with the click of a
button. The manager has requested the date and time be included in the
filename of the spreadsheet.

What is the easiest method (if there is one) to do this.
 
I found the following code:


Dim sToday As String

sToday = Format(Date, "mmddyyyy") & "_" & Format(Time, "hhmm")
DoCmd.TransferSpreadsheet acExport, 8, "VRM for Export", "C:\My
Documents\FILE" & sToday & ".xls", True


I want to check if the following would work before I continue:


Dim sToday As String

sToday = Format(Date, "mmddyyyy") & "_" & Format(Time, "hhmm")

DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, "Report_Outstanding_Anna", _
"C:\Outstanding Queries" & sToday & ".xls", True , "Anna"
 
Its okay now.

--
www.ae911truth.org



scubadiver said:
I found the following code:


Dim sToday As String

sToday = Format(Date, "mmddyyyy") & "_" & Format(Time, "hhmm")
DoCmd.TransferSpreadsheet acExport, 8, "VRM for Export", "C:\My
Documents\FILE" & sToday & ".xls", True


I want to check if the following would work before I continue:


Dim sToday As String

sToday = Format(Date, "mmddyyyy") & "_" & Format(Time, "hhmm")

DoCmd.TransferSpreadsheet acExport, _
acSpreadsheetTypeExcel9, "Report_Outstanding_Anna", _
"C:\Outstanding Queries" & sToday & ".xls", True , "Anna"
 
scuba,
may I make a suggestion. If you format it as year, month, day, hour,
minute, it will sort better and make the files easier to find in the folder.
sToday = format(now,"yyyymmddhhmm") & ".xls"
 
Cheers



Klatuu said:
scuba,
may I make a suggestion. If you format it as year, month, day, hour,
minute, it will sort better and make the files easier to find in the folder.
sToday = format(now,"yyyymmddhhmm") & ".xls"
 
Back
Top