Young Grasshopper
Board Regular
- Joined
- Dec 9, 2022
- Messages
- 58
- Office Version
- 365
- 2016
- Platform
- Windows
Hi Guys,
I have a group of shapes, that includes 15 texboxes named HeadlinePreview1, HeadlinePreview2, HeadlinePreview3 etc.
I would like to loop through these and ad the text to a combobox if it's not empty. It should be a simple matter, but i can't seem to make it work...
This is the code i have now.. What am I missing? (MyShp is a public variables and is tested, so no problems with that)
Thank you
I have a group of shapes, that includes 15 texboxes named HeadlinePreview1, HeadlinePreview2, HeadlinePreview3 etc.
I would like to loop through these and ad the text to a combobox if it's not empty. It should be a simple matter, but i can't seem to make it work...
This is the code i have now.. What am I missing? (MyShp is a public variables and is tested, so no problems with that)
VBA Code:
Private Sub HeadLine1Box_Click()
Dim ih As Long
Dim HeadlineX As String
HeadLine1Box.Clear
For ih = 1 To 15
If MyShp.GroupItems("HeadlinePreview" & ih).TextFrame.Characters.Text = "*" Then
HeadlineX = MyShp.GroupItems("HeadlinePreview" & ih).TextFrame.Characters.Text
Me.HeadLine1Box.AddItem HeadlineX
End If
Next
End Sub
Thank you
