OLE Object
i've got a problem with an ole object...
following situtation:
- insert a worksheet as an ole object in open worksheet
- change some data in ole object
code (i write it by heart - maybe there are some errors):
Dim objOLE As OLEObject
Set objOLE = ActiveSheet.OLEObjects.Add( _
Filename:=ThisWorkbook.Path & "\Template.xls", Link:=False,
DisplayAsIcon:=False)
Dim myWorkbook As Workbook
set myWorkbook = objOLE.Object
With myWorkbook.Sheets(1)
.Range("$C$3") = "Whatsoever"
'do so for several ranges
End With
myWorkbook.Close
the code works without a problem, but shows no reaction. the oleobject
does not update. fine.
meanwhile i recognized the .VERB method and even if i don't like the
way it work - it seems to work - as long as i test my code step by
step. if i RUN the code i get an error message when i try to close the
workbook and excel crashes.
so please - somebody show me the right handling of the VERB method
(please complete code) or a possiblity to update the ole object (as
mentioned above).
that's all folks
rené
|