inarno Level: Trainee
 Registered: 21-01-2010 Posts: 2
|
Send textbox value from form to User Control Properties
Hi, All
I make an ActiveX Control OCX File, i put a button : btnSTART, if user click this button (user control) then form appear with the textbox field. After that user input number to the Textbox field and i will get the textbox value to button properties (UserControl.InputBox) but this properties can not change according the textbox field.
Here is my code :
In the UserControl :
Public Event Click()
Private Sub btnSTART_Click()
RaiseEvent Click
fcPLATE.Show vbModal, Me
End Sub
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
InputBox = PropBag.ReadProperty("InputBox", "0.00")
End Sub
Private Sub UserControl_Resize()
btnSTART.Move 0, 0, ScaleWidth, ScaleHeight
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
PropBag.WriteProperty "InputBox", InputBox, "0.00"
End Sub
Public Property Get InputBox() As Variant
InputBox = fcPLATE.Text2.text ' (i hope can take text value from fcPLATE.frm)
End Property
Public Property Let InputBox(ByVal NewValue As Variant)
fcPLATE.Text2.text = NewValue
PropertyChanged ("InputBox")
End Property
I assign the Source Code
I have been trying for a week and i confuse now. javascript:void(0);
Someone could help me, please?
____________________________
Ino
|