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!

Unable to set the ChartTitle to my chart!!

Status
Not open for further replies.

mrdod

Technical User
Jun 12, 2006
103
US
On other forms/charts this code is working. For some reason this one keeps bombing out. I keep getting a 1004 run time error saying "Uable to Set the HasTitle property of the Chart class" This did work then it quit. I have Microsoft Graph 11.0 Object Libray selected in my references but don't think that has anything to do with it.

Here is my code:
Option Compare Database

Private Sub Form_Open(Cancel As Integer)
Dim Mychart As ObjectFrame
Set Mychart = Me!chrt
txt = "hello "
With Mychart
If Not .HasTitle Then
.HasTitle = True 'Bombs out here
.ChartTitle.Text = Form_frmmakereportbu.cmbbu.Value

Else
.ChartTitle.Text = Form_frmmakereportbu.cmbbu.Value

End If
.Refresh
End With

End Sub


Any thoughts? Is using the Microsoft Graph easier than using the chart Wizard?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top