austin350s10
Active Member
- Joined
- Jul 30, 2010
- Messages
- 321
I am trying to reference a chart title and assign its text value to a form controls caption value but I keep getting the following runtime error "object doesn't support this property or method". Here is the code I was trying to use:
The bold line is the one that is giving me problems. What am I doing wrong here?
Code:
For Each ch In ActiveSheet.ChartObjects
For Each obj In Me.frmHours.Controls
If ch.Name = obj.Name Then
obj.Visible = True
[B]obj.Caption = ch.Charts.ChartTitle
[/B] End If
Next obj
Next ch
The bold line is the one that is giving me problems. What am I doing wrong here?