Article ID: 202147
Article Last Modified on 6/23/2005
Command Button -------------- Name: Title Caption: Toggle Caption
Sub Title_Click()
'-------------------------------------------------------
' Show or hide the title by using the Not Operator to
' reverse the state of the HasTitle property
'-------------------------------------------------------
Me!Graph1.Hastitle = Not Me!Graph1.Hastitle
' If the graph has a title, set the Caption to something
If Me!Graph1.Hastitle Then
Me!Graph1.ChartTitle.Text = "Sample Title"
End If
End Sub
Option Explicit
Command Button ---------------------- Name: Legend Caption: Toggle Legend
Sub Legend_Click () '----------------------------------------------------------- ' If the legend is not present, show it; otherwise, hide it. ' Use the Not Operator to reverse the state of the HasLegend ' property of the graph. '----------------------------------------------------------- Me!Graph1.Haslegend = Not Me!Graph1.Haslegend End Sub
Option Explicit
Additional query words: link embed
Keywords: kbhowto KB202147