Mikeymike_W
Board Regular
- Joined
- Feb 25, 2016
- Messages
- 171
Hi,
I'm trying to populate a textbox (Textbox1) which is embedded within a chart (Chart1). Chart1 is found on the sheet called "Christmas".
I'm wanting to populate textbox1 with the value of a textbox ("TBFrom1") from a userform.
I've been looking everywhere for answers but haven't found anything that works.
I've tied the following bit of code but it throws an error when setting the cht value.
Thanks in advance for any help,
Mike
I'm trying to populate a textbox (Textbox1) which is embedded within a chart (Chart1). Chart1 is found on the sheet called "Christmas".
I'm wanting to populate textbox1 with the value of a textbox ("TBFrom1") from a userform.
I've been looking everywhere for answers but haven't found anything that works.
I've tied the following bit of code but it throws an error when setting the cht value.
Thanks in advance for any help,
Mike
VBA Code:
Private Sub CBCreate_Click()
Worksheets("Christmas").Activate
Dim cht As Chart
Dim txtB As TextBox
Set cht = Charts("Chart1")
Set txtB = cht.TextBoxes("Textbox1")
txtB.Text = Me.TBFrom1.Value
Unload Me
End Sub