Article ID: 119469
Article Last Modified on 11/6/2000
Text Box
-------------
Name: MyTitle
Command Button
---------------------
Name: Title
Caption: Show Caption
Sub Title_Click ()
Dim The_title As String
'--------------------------------------------------------------
' This function reads the text box. If it is null or blank, it
' supplies a generic title, otherwise it adds a title and sets
' the caption to the text box's contents.
'--------------------------------------------------------------
If IsNull(Me![MyTitle]) Or Me![MyTitle] = "" Then
The_title = "No Title"
Else
The_title = Me![MyTitle]
End If
If Me![Title].Caption = "Show Title" Then
Me![Embedded13].Object.Application.Chart.Hastitle = -1
Me![Embedded13].Object.Application.Chart.Charttitle.Caption = _
The_title
Me![Title].Caption = "Hide Title"
Else
Me![Embedded13].Object.Application.Chart.Hastitle = 0
Me![Title].Caption = "Show Title"
End If
End Sub
Option Explicit
Name: Legend
Caption: Show Legend
Sub Legend_Click ()
'----------------------------------------------------------
' If the legend is not present, show it, otherwise hide it.
'----------------------------------------------------------
If Me![Legend].Caption = "Show Legend" Then
Me![Embedded13].Object.Application.Chart.Haslegend = -1
Me![Legend].Caption = "Hide Legend "
Else
Me![Embedded13].Object.Application.Chart.Haslegend = 0
Me![Legend].Caption = "Show Legend"
End If
End Sub
Option Explicit
Additional query words: link embed
Keywords: kbhowto KB119469