+ Reply to Thread
Results 1 to 16 of 16

textbox and checkbox

  1. #1
    Registered User
    Join Date
    06-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    27

    textbox and checkbox

    I have a checkbox and multiple textbooks let say about 10.When the checkbox=true , i will be able to write data inside. if checkbox=false, it will be lock. THe code below work when only i click the button. How do i make it work immdiately upon when the checkbox=false?

    Please Login or Register  to view this content.


    Go www.cashcrate.com/3866888 to earn cash online!!!
    Last edited by ngkj; 07-17-2012 at 05:16 AM.

  2. #2
    Forum Contributor
    Join Date
    06-14-2008
    Posts
    153

    Re: textbox and checkbox

    Put the code in CheckBox1_Change() instead of CheckBox1_Click.
    Welcome to: http://www.exceldigest.com/myblog/
    "Excel help for the rest of us"

  3. #3
    Registered User
    Join Date
    06-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: textbox and checkbox

    still the textbox cant be lock upon running








    Go www.cashcrate.com/3866888 to earn cash online!!!
    Last edited by ngkj; 07-17-2012 at 05:17 AM.

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: textbox and checkbox

    if you use a userform the idea given by se1429 works
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  5. #5
    Registered User
    Join Date
    06-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: textbox and checkbox

    I am new to this, maybe u wanna take a look at my file.










    Go www.cashcrate.com/3866888 to earn cash online!!!
    Attached Files Attached Files
    Last edited by ngkj; 07-17-2012 at 05:19 AM.

  6. #6
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: textbox and checkbox

    see if it helps you, please continue with the rest of your textboxes/checkboxes
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: textbox and checkbox

    Yup! It works! thanks P.S just to ask another thing. If checkbox is not check the data will not be change, how can i do that?








    Go www.cashcrate.com/3866888 to earn cash online!!!
    Last edited by ngkj; 07-17-2012 at 05:20 AM.

  8. #8
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: textbox and checkbox

    Quote Originally Posted by ngkj View Post
    Yup! It works! thanks P.S just to ask another thing. If checkbox is not check the data will not be change, how can i do that?
    in this case, why you use this code in your first post?!
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    06-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: textbox and checkbox

    i was new to this so i don't really know, sorry. the error i get was that even thought the checkbox is uncheck the data still change upon clicking the button.
    this is me current codes
    Please Login or Register  to view this content.








    Go www.cashcrate.com/3866888 to earn cash online!!!
    Last edited by ngkj; 07-17-2012 at 05:21 AM.

  10. #10
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: textbox and checkbox

    no problem at all, we are here to help each other and to learn!
    so, please the test file attached, it works for me, if the checkbox is checked you can type in yr textboxes if not...not!
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    06-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: textbox and checkbox

    yup! i am a student new to this it can work but when it's uncheck the actual data get remove/change








    Go www.cashcrate.com/3866888 to earn cash online!!!
    Attached Files Attached Files
    Last edited by ngkj; 07-17-2012 at 05:21 AM.

  12. #12
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: textbox and checkbox

    are you working in userform, aren't you?
    when you display yr userform, the checkbox1 is checked, so you can type/add text in yr textboxes, if checkbox1 is unchecked the textboxes(1...) are locked you can not add/delete anything in them!

  13. #13
    Registered User
    Join Date
    06-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: textbox and checkbox

    yep i know, i wanted to change the data in the worksheet and i solved it! and better ways others than this?
    Please Login or Register  to view this content.

    Go www.cashcrate.com/3866888 to earn cash online!!!
    Last edited by ngkj; 07-17-2012 at 05:22 AM.

  14. #14
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: textbox and checkbox

    I do not know, you can try this
    Please Login or Register  to view this content.
    and if you want to see in the userform yr values try to add in the userform this code
    just try to play with it
    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    06-25-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: textbox and checkbox

    Thanks! you have been a great help to me!



    Go www.cashcrate.com/3866888 to earn cash online!!!
    Last edited by ngkj; 07-17-2012 at 05:22 AM.

  16. #16
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: textbox and checkbox

    glad to be of help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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