M
michael.f.shorkey
I have no trouble opening EXCEL, and saving excel files
and inserting values from a ADO recordset to cells.
My ONLY problem is when using an existing spreadsheet with
mulitple sheets and I want to re-direct (activate) a
SPECIFIC sheet with a variable that I have as a recordset
variable. Here's what I have:
dim xlapp as excel.application, myXL as object
SET XLapp = CreateObject("Excel.Application")
set myXL = xlapp.open("filename.xls")
myxl.worksheets("Sheet1").activate
....insert working data here; NOW
myxl.worksheets("& rs!nextWS &").activate
This is always where the error occurs. Any ideas? I can
type in the value and this works fine, but I really need
to pass worksheet reference programmatically.
and inserting values from a ADO recordset to cells.
My ONLY problem is when using an existing spreadsheet with
mulitple sheets and I want to re-direct (activate) a
SPECIFIC sheet with a variable that I have as a recordset
variable. Here's what I have:
dim xlapp as excel.application, myXL as object
SET XLapp = CreateObject("Excel.Application")
set myXL = xlapp.open("filename.xls")
myxl.worksheets("Sheet1").activate
....insert working data here; NOW
myxl.worksheets("& rs!nextWS &").activate
This is always where the error occurs. Any ideas? I can
type in the value and this works fine, but I really need
to pass worksheet reference programmatically.