In Access (VBA) this code doesen't work. But in VB it works?
VB Code:
Private Sub Command1_Click() Dim oleGrf As Object Set oleGrf = Me.OLEchart.Object oleGrf.ChartTitle.Text = "Test" Set oleGrf = Nothing End Sub
Why?
Printable View
In Access (VBA) this code doesen't work. But in VB it works?
VB Code:
Private Sub Command1_Click() Dim oleGrf As Object Set oleGrf = Me.OLEchart.Object oleGrf.ChartTitle.Text = "Test" Set oleGrf = Nothing End Sub
Why?
I don't know but I suspect the VBA people will.Quote:
Originally Posted by Pirre001
Moved to Office Development.
Pirre
Your syntax look right.
Here is a one liner that should change your Chart Title
VB Code:
Me.OLEchart.Object.ChartTitle.Text = "Your text here"
The attache Db shows this in action.
Big Thanks Kenny! :thumb: