Unsuccessful attempts to embed an Excel sheet in an Excel sheet.
The following two statements threw Run-time error 1004: Unable to get the Add property of the OLEObject class:
set obj = activesheet.oleobjects.add(classType := "excel.sheet")
set obj = activesheet.oleobjects.add(classType := "excel.sheet.12")
This attempt opened a new excel application, but the sheet was not embedded in the activesheet
.
set obj = activesheet.oleobjects.add(classType := "excel.application")
set wb = obj.object.workbooks.add
set sh = wb.sheets(1)
obj.object.visible = true
sh.cells(2,3) = "x"