07-04-2008, 07:04 PM
Here's the basic code:
What I want it to do is a Save As that creates a new spreadsheet that uses the variable sA sB sC sD as the file name.
How do I do this?
Thanks,
TheVig
function str'sA str&sB str&sC str&sD
str sfile="$desktop$\JVF\Template.xls"
str asheet="Template A"
str bsheet="Template B"
Excel.Application app._create
Excel.Workbook book=app.Workbooks.Open(_s.expandpath(sfile))
ExcelSheet es1.ws=book.Worksheets.Item(asheet)
ExcelSheet es2.ws=book.Worksheets.Item(bsheet)
es1.SetCell(sA 1 1)
es1.SetCell(sB 1 2)
es2.SetCell(sC 1 1)
es2.SetCell(sD 1 2)
book.SaveWhat I want it to do is a Save As that creates a new spreadsheet that uses the variable sA sB sC sD as the file name.
How do I do this?
Thanks,
TheVig
