Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error when trying to activate OLE object in report

Status
Not open for further replies.

ZappaDog

Technical User
May 13, 2002
25
US
I am trying to write a function which will activate a word document in an unbound object frame when the report is opened. This is my function now.

Private Sub Report_Open(Cancel As Integer)
Dim UnboundOLE As ObjectFrame
On Error GoTo Err_Report_Open
Set UnboundOLE = Me.Controls("oleDocument")
UnboundOLE.Action = acOLEActivate
UnboundOLE.SetFocus
Exit_Report_Open:
Exit Sub
Err_Report_Open:
MsgBox Err.Description
Resume Exit_Report_Open
End Sub

When I run this I get "Run-time error '2771': The bound or unbound object frame you tried to edit doesn't contain an OLE object". In searching the threads i have seen this error referred to several times, but no explanations or solutions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top