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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple ActiveX and Form question

Status
Not open for further replies.

bilgner

Programmer
Sep 10, 2004
4
0
0
ZA
I have built a control (.ocx) containing a button and a label. The button starts up a form which also has button. When the Form button is pressed I would like to change the text in the control label and the properties of the control label. How can this be done ?

Below is some VB code:
The control (.ocx)

Private sub command1_Click()
Trial.show 0 'this button pops up my form
end sub

The Form

Private sub command1_click()
' what goes here to change the label details in the control
' This is not trivial as the control is not a form
end sub
 
bilgner, try this:

Private sub command1_Click()

Label1.Caption = "mytext"
Label1.BackColor = &H80000001
Trial.show 0 'this button pops up my form

end sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top