aarondewberry
IS-IT--Management
All
I have some code to export my data into an excel spreadsheet, as html, and save with todays date.
However, is it possible to save the excel spreadsheet using the date on one of my variables ("DateReceived"), instead of todays date?
See code:
I have some code to export my data into an excel spreadsheet, as html, and save with todays date.
However, is it possible to save the excel spreadsheet using the date on one of my variables ("DateReceived"), instead of todays date?
See code:
Code:
Dim DOC As Document
Dim REP As Report
Dim setdate As Date
setdate = Date
Set DOC = Application.Documents.Item(1)
Set REP = DOC.Reports.Item(1)
REP.ExportAsHtml ("[i]string…[/i] " & Format(setdate, "dd-mm-yy") + ".xls")