+ Reply to Thread
Results 1 to 6 of 6

make a userform check box and password

Hybrid View

  1. #1
    Registered User
    Join Date
    06-03-2013
    Location
    Jakarta, Id
    MS-Off Ver
    Excel 2007
    Posts
    13

    make a userform check box and password

    hello there,,

    i want to make a userform with some checkboxes, and i want to make a password to enable/disable some check boxes,can't you teach me step by step,so that the userform running good,

    i'm sorry for my bad english,,

    example Untitled.jpg
    - jekidi

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: make a userform check box and password

    What have you got so far?
    i want to make a userform
    implies you have started something. Why not provide us with what you have so that we don't have to do all the work for you?
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Registered User
    Join Date
    06-03-2013
    Location
    Jakarta, Id
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: make a userform check box and password

    here's the example i'm tryng to adding a password to enable and disable (target,insentif,minus) but not succes.

    SHOW HIDE SHEETS with the password.xlsm

  4. #4
    Registered User
    Join Date
    06-03-2013
    Location
    Jakarta, Id
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: make a userform check box and password

    can't someone help me..

  5. #5
    Forum Contributor
    Join Date
    03-14-2012
    Location
    location
    MS-Off Ver
    Excel 2007
    Posts
    170

    Re: make a userform check box and password

    Hello!
    try this:
    add this one to your userform:
    Private Sub UserForm_Initialize()
        CheckBox10.Enabled = False
        CheckBox6.Enabled = False
        CheckBox14.Enabled = False
    End Sub
    then to each CheckBox (10,6,14)
    Private Sub CheckBox10_Click()
    Application.ScreenUpdating = 0
    Select Case CheckBox10.Value
        Case True: Sheets("TARGET").Visible = True
        Case False: Sheets("TARGET").Visible = xlSheetVeryHidden
    End Select
    Application.ScreenUpdating = 1
    End Sub
    
    Private Sub CheckBox14_Click()
    Application.ScreenUpdating = 0
    Select Case CheckBox14.Value
        Case True: Sheets("MINUS").Visible = True
        Case False: Sheets("MINUS").Visible = xlSheetVeryHidden
    End Select
    Application.ScreenUpdating = 1
    
    End Sub
    
    Private Sub CheckBox6_Click()
    Application.ScreenUpdating = 0
    Select Case CheckBox6.Value
        Case True: Sheets("INSENTIF").Visible = True
        Case False: Sheets("INSENTIF").Visible = xlSheetVeryHidden
    End Select
    Application.ScreenUpdating = 1
    End Sub
    then to your textbox1
    Private Sub TextBox1_Change()
    If TextBox1.Value = "123" Then CheckBox10.Enabled = True
    If TextBox1.Value = "123" Then CheckBox6.Enabled = True
    If TextBox1.Value = "123" Then CheckBox14.Enabled = True
    End Sub
    hope it will work for you.

    blue

  6. #6
    Registered User
    Join Date
    06-03-2013
    Location
    Jakarta, Id
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: make a userform check box and password

    thanks @blue.chio its work, but with my little modification,, but how to add dialogbox if user type the wrong password?

    i write this
    Private Sub TextBox1_Change()
    If TextBox1.Value = "123" Then CheckBox10.Enabled = True
    If TextBox1.Value = "123" Then CheckBox6.Enabled = True
    If TextBox1.Value = "123" Then CheckBox14.Enabled = True
    End Sub
    in
    Private Sub CommandButton3_Click()
    but if user typing wrong password, i want to add dialog box with cancel and try again how to apply this,, i try to add ELSE option in textbox value, but it says code error
    compile error :
    
    else without if
    sorry for my late post, i forgot password for this site LOL
    Last edited by jekidi; 12-23-2014 at 10:12 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1