Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a form with an Active X on.

Status
Not open for further replies.

99mel

Programmer
Oct 18, 1999
379
GB
I've made this ActiveX Control which I feed values to its properties.

This activeX is on another form though and when i do something like:

frmActiveX.MyControl.ID = 10

It goes to the 'ReadProperties' resulting in not getting the value i'm passing to it. Any info much appreciated.

Mel
 
I do not have that problem, this is the code in my control:

Dim harm As Integer

Public Property Get myval() As Integer
myval = harm
End Property

Public Property Let myval(new_myval As Integer)
harm = new_myval
End Property

this is the code in form1:

Private Sub Command1_Click()
Form2.UserControl11.myval = Text1.Text
End Sub

Private Sub Command2_Click()
Text1.Text = Form2.UserControl11.myval
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top