Forum Discussion
HKosova
Alumni
9 years agoHi Frank,
If you use JavaScript (not JScript), you need to use .Item to access collection items in COM objects.
var xlsheet = excel.ActiveWorkBook.WorkSheets.Item(sheetname);
tristaanogre
9 years agoEsteemed Contributor
HKosova wrote:
Hi Frank,
In JavaScript (unlike JScript), you need to use .Item to access collection items in COM objects.
var xlsheet = excel.ActiveWorkBook.WorkSheets.Item(sheetname);JavaScript - Specifics of Usage: Accessing Collection Items
Ah, yes... there is that... however, he's using the same code in a different location so I'm thinking this is JScript and not JavaScript... but certainly worth the try...