#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default User Form

I need a user form that allows a user to select a check box and according to
which one they select only select item are visible on the form.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default User Form

Hi,

- On the userform, add a checkbox, say CheckBox1.
- Now put all the controls that should show/hide based on checkbox1 on a
Frame, say Frame1
- in the userform code module, insert the code:

Private Sub CheckBox1_Click()
Frame1.Visible = CheckBox1.Value
End Sub

Checking or unchecking checkbox1 makes the Frame1 (and all controls on that
frame) show or hide.

To add another checkbox, follow the same process replacing CheckBox1 by
Checkbox2, Frame1 by Frame2 and same in the code:
Private Sub CheckBox2_Click()
Frame2.Visible = CheckBox2.Value
End Sub

....

--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"krc547" wrote:

I need a user form that allows a user to select a check box and according to
which one they select only select item are visible on the form.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call user form from ThisWorkbook; close file if form closed XP Excel Programming 2 July 20th 07 07:04 PM
Automatically add a textbox to a user form based on user requireme Brite Excel Programming 4 April 7th 07 11:37 PM
User form ComboBox Items: Remember user entries? [email protected] Excel Programming 0 March 29th 07 06:41 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM


All times are GMT +1. The time now is 09:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"