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

Userform in excel

Status
Not open for further replies.

AgatheB

Programmer
Jan 16, 2003
36
DK
Hi ,
I'm new at this so sorry if my question is a bit unstructured.
How can I set a "child"userform in excel without the form getting activated. I start in the "mother"form, and when I click the button "show childform" it should show only the childform, because the motherform is already open.
Now, as soon as i get to the 'set'part the procedure jumps to private sub userform_initialize, where the motherform gets opened again.

'===============================
Private Sub btnShowChild_Click()
'===============================
' Finds the child to the mother.
Dim The_MotherForm As Object, The_ChildForm As Object

Set The_MotherForm = UF_Mother
Set The_ChildForm = UF_Child

Load_ChildForm The_MotherForm, The_ChildForm

End Sub
 
You can use something like this.

In the command_button_click event of the MOTHER FORM,

Use the following code.

Motherform.hide
Childform.show

'you may need to tweak the code depending on the names assigned to your userform.

Hope this helps.

Ram P
 
What does this line do?

Load_ChildForm The_MotherForm, The_ChildForm

Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top