View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Can Excel show OLE object created in DLL of VB6 ?

I don't follow this bit

and for insertable object of Excel chart I use
Set chrt = Chart1.object.Charts(1)
Set exl_WKS = Chart1.object.Worksheets(1)


Where is that code, in the dll or in Excel VBA
'Chart1' looks like it is the codename of an Excel chart-sheet, is that in a
normal Excel instance or in the OLE

I still don't follow how the dll form is called and shown from Excel. IOW
how is the dll installed or called from within Excel, I get the impression
it's as an OLE object on a chart sheet - interesting !

Regards,
Peter T




"chris" wrote in message
...
Yes, for OLE Container Control I use

Set chrt = ole1.object.Charts(1)
Set exl_WKS = ole1.object.Worksheets(1)

and for insertable object of Excel chart I use

Set chrt = Chart1.object.Charts(1)
Set exl_WKS = Chart1.object.Worksheets(1)

DLL is compiled as ActiveX DLL.

In form load I am assigning some test data for both charts in the
worksheet
object retrieved (see above).

exl_WKS.Cells(1, 2).Value = "a"
exl_WKS.Cells(1, 3).Value = "b"
exl_WKS.Cells(2, 2).Value = 500

exl_WKS.Names.Add Name:="Chart_Range", RefersToR1C1:="=" & "R" & "1" &
"C"
& "1:" & "R" & "2" & "C" & "3"

exl_chrt.SetSourceData Source:=exl_WKS.Range("Chart_Range"),
PlotBy:=xlRows