Hey guys, I'm coding a series of macros for Extra's Attachmate. Quite a few of them read data from an excel spreadsheet using the following code. (they are global for a reason)
Global xl_app as Object
Global xl_wb as Object
Global xl_file as String
in my main I have this to instantiate it
xl_file = "template.xls"
Set xl_app = CreateObject("Excel.Application")
Set xl_wb = xl_app.Workbooks.Open(xl_file)
now, after I've manipulated the data I wish to change etc, I would like to save it as report-073107.xls or whatever the current date is. currently I just call the xl_wb.Save and xl_wb.Close methods.
How would I go about saving the file as a differnet name so the template stays unmodified and I can generate reporst daily without having to clear the spreadsheet?
Thanks in advance
Global xl_app as Object
Global xl_wb as Object
Global xl_file as String
in my main I have this to instantiate it
xl_file = "template.xls"
Set xl_app = CreateObject("Excel.Application")
Set xl_wb = xl_app.Workbooks.Open(xl_file)
now, after I've manipulated the data I wish to change etc, I would like to save it as report-073107.xls or whatever the current date is. currently I just call the xl_wb.Save and xl_wb.Close methods.
How would I go about saving the file as a differnet name so the template stays unmodified and I can generate reporst daily without having to clear the spreadsheet?
Thanks in advance