Click to See Complete Forum and Search --> : Ole Container


rock007
January 25th, 2000, 10:34 AM
I was wondering how to place an OLE object into an OLE container without saving it to a file first. For Example:

'OLE1 is an OLE container on a form
Dim Excel1 As Object
Set Excel1 = CreateObject("Excel.Sheets")

Set OLE1.object = Excel1

This returns an error since (I think) the object property is read only. Does anyone know how to do this?

fotisgpap
January 25th, 2000, 01:48 PM
why don't you try connecting to excel files using the Microsoft Excel Object library ? You can add it from your project's references. Using this library you have full functionality of excel without even creating an ole object.

rock007
January 26th, 2000, 01:14 PM
I have full control of the excel object as is. The problem is that I am being passed a reference to the excel object and I would like to place it on a form in a Ole Container. I can save it to a file then retrieve it but I am hoping that is unnecessary.
I do appreciate your reply.