excel user forms

sujith

New Member
Joined
Jan 4, 2012
Messages
45
Hi
can any one help me to get the data in groups in user form,
like i have group1- in that we are having subgroups, like gp1-subgrp1, gp1-subgrp2, .. like this.
when we click on group1, the subgroups should appear and when we click again subgroups should hide..
like we can have grop2 and group3 , .. so on..

i can acheive by this treeview concept, but i need in any other way.. so pls help me in this..
thank you
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi,

One of the easiest ways to group your controls is in a frame.
Insert a new user form and make it big.

Add a frame that's big enough to hold three CommandButtons.

Place the buttons inside of the frame.

Place a ToggleButton on the form but outside of the frame. Make it wide.

Doubleclick the user form and add this:

Code:
Private Sub UserForm_Initialize()
  ToggleButton1.Caption = "Toggle Group 1"
End Sub

Go back to the form, doubleclick the togglebutton and add this:

Code:
Private Sub ToggleButton1_Click()
  If ToggleButton1 Then
      Frame1.Visible = False
  Else: Frame1.Visible = True
  End If
End Sub

Push F5 to run the form and click the togglebutton on and off.

Hope this gets you going.
 
Upvote 0
Hi
Thanks for the replay.
actually i need user groups, thats consits team name and users under this team.
there may be any number of teams and users,
the idea is, when i click on team name, the users under that team should appear and vice versa..

i hope u understand this,, if u can help me this, im happy...
thank you


Hi,

One of the easiest ways to group your controls is in a frame.
Insert a new user form and make it big.

Add a frame that's big enough to hold three CommandButtons.

Place the buttons inside of the frame.

Place a ToggleButton on the form but outside of the frame. Make it wide.

Doubleclick the user form and add this:

Code:
Private Sub UserForm_Initialize()
  ToggleButton1.Caption = "Toggle Group 1"
End Sub

Go back to the form, doubleclick the togglebutton and add this:

Code:
Private Sub ToggleButton1_Click()
  If ToggleButton1 Then
      Frame1.Visible = False
  Else: Frame1.Visible = True
  End If
End Sub

Push F5 to run the form and click the togglebutton on and off.

Hope this gets you going.
 
Upvote 0
Hi
Thanks for the replay.
actually i need user groups, thats consits team name and users under this team.
there may be any number of teams and users,
the idea is, when i click on team name, the users under that team should appear and vice versa..

i hope u understand this,, if u can help me this, im happy...
thank you


Hi,

One of the easiest ways to group your controls is in a frame.
Insert a new user form and make it big.

Add a frame that's big enough to hold three CommandButtons.

Place the buttons inside of the frame.

Place a ToggleButton on the form but outside of the frame. Make it wide.

Doubleclick the user form and add this:

Code:
Private Sub UserForm_Initialize()
  ToggleButton1.Caption = "Toggle Group 1"
End Sub

Go back to the form, doubleclick the togglebutton and add this:

Code:
Private Sub ToggleButton1_Click()
  If ToggleButton1 Then
      Frame1.Visible = False
  Else: Frame1.Visible = True
  End If
End Sub

Push F5 to run the form and click the togglebutton on and off.

Hope this gets you going.
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,572
Members
448,972
Latest member
Shantanu2024

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top