The problem isn't the ole control itself, the problem is it is trying to insert the CrViewer control into the CRViewer9 class which doesn't exist. Instead use the olecontrol as the base class to host the ActiveX control.
ie.
ThisForm.AddObject("oleViewer", "olecontrol", "CRViewer9.CRViewer.9.2")
ThisForm.oleViewer.Visible = .t.
Hope this helps,
Kurt
>When I run this code, I get the error "Class defintion CRViewer9 is not found"
>
>
>ThisForm.AddObject("oleViewer", "CRViewer9", "CRViewer9.CRViewer.9.2")
>
>
>What am I doing wrong here?