The code below will expose a text property for a text box on a usercontrol (I just left the default text box name). With this code you will have a text property in the properties explorer that can be changed at design time when you place the control on your form or you could change the property at runtime through code.
VB Code:
'Code in your usercontrol
Option Explicit
Public Property Get Text() As String
Text = Text1.Text
End Property
Public Property Let Text(ByVal New_Text As String)
Text1.Text = New_Text
PropertyChanged "Text"
End Property
Private Sub UserControl_InitProperties()
Text = UserControl.Extender.Name
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
Text1.Text = PropBag.ReadProperty("Text")
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)