listbox with name ReportName
[VBA]
Private Sub UserForm_Initialize()
Me.ReportName.AddItem Me.Caption
Me.ReportName.Selected(0) = True
End Sub
[/VBA]
TextBox with name ReportName
[VBA]
Private Sub UserForm_Initialize()
Me.ReportName.Value = Me.Caption
Me.ReportName.SelStart = 0
Me.ReportName.SelLength = Len(Me.ReportName.Text)
End Sub
[/VBA]
So now I'm confused, can you upload a sample? The sample I have uploaded has a textbox with the name of TextBox1 and a listbox namd ReportName. When you see the form both sets of text will be highlighted.