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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What Reference library do I need for OLEunbound.Enabled

Status
Not open for further replies.

Kotartidzo

Technical User
Apr 28, 2008
9
US
I am using Access 2003 and am trying to save a Microsoft Graph chart unbound object in a report as a GIF file for uploading to Sharepoint.

I have copied code from the Microsoft support shown below. However, when I run the code my system does not recognize the unbound.locked and unbound.enabled functions. I think it is because I do not have a particular reference library. Any help on why my system doesn't recognize this code would be appreciated.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'On Error GoTo Err_Detail_Format
'for this code to work you need to have the Microsoft Graph 11.0 Object library installed in the Tools/References
'Code as downloaded from on 08Feb2011

Dim grpApp As Graph.Chart
Set grpApp = Me.OLEUnbound0.Object
grpApp.Export "O:\COMMON_DATA\ServicePartsData\FillRate-PastDue\FillRate\fillratechart.gif", "GIF", False

Me!OLEUnbound0.Locked = False

Me.OLEUnbound0.Enabled = True

Set grpApp = Nothing

Me.OLEUnbound0.Action = acOLEClose

DoCmd.Close

Exit_Detail_Format:
Exit Sub

Err_Detail_Format:
MsgBox Err.Description
Resume Exit_Detail_Format

End Sub
 
As clearly stated in your code:
you need to have the Microsoft Graph 11.0 Object library installed in the Tools/References

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I do have it checked. That is what allowes me to dimension the variable as a Graph.Chart. However, the enabled and locked actions keep comming up with an error.
 
I have the object defined as OLEunbound0 and have tried the solution as a form and as a report.
 
The problem lay in the fact that I needed the graph to be in a Form, not a report. Once I created the graph in a form all the object properties were available.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top