Option Explicit
Function action
Dim xlsApp,dstr,fname
dstr = FormatDateTime(Date)
fname="d:\" + dstr + ".xls"
Set XlsApp = CreateObject("Excel.Application")
XlsApp.WorkBooks.Add
XlsApp.ActiveWorkbook.SaveAs("d:\fname.xls")
XlsApp.Quit
Set XlsApp = nothing
End Function
这样建立的表的名字不是当天日期而是"fname",不知道哪里有问题,请高手看看