I am trying to learn how to make an ActiveX control. I followed a tutorial but all it does is make a messagebox come up with its titlebar having the name of the control. What is it supposed to teach me? I am pasting the code unless its wrong.
I compiled the control but it does not do anymore.
I am trying to find out the basics of building an ActiveX control, in particular to data being passed into the control from a form and data being sent back to the form. I have looked everywhere for simple instructions but so far without luck. Thanks
Code:Dim TextVariable As String Event Click() Event KeyPress(Keyascii As Integer) Private Sub Command1_Click() MsgBox (TextVariable) RaiseEvent Click End Sub Private Sub Command1_KeyPress(Keyascii As Integer) RaiseEvent KeyPress(KeyAscii) End Sub Private Sub MyControl_ReadProperties(PropertyBag) TextVariable = PropBag.ReadProperty("Text", "There is no message") End Sub Private Sub MyControl_Resize() Command1.Width = MyControl.Width Command1.Height = MyControl.Height End Sub Public Property Get Text() As String Text = TextVariable End Property Private Sub MyControl_WriteProperties(PropBag As PropertyBag) Call PropBag.WriteProperty("Text", TextVariable, "There is no message") End Sub Public Property Let Text(ByVal New_Text As String) TextVariable = New_Text PropertyChanged "Text" End Property




