+ Reply to Thread
Results 1 to 2 of 2

1 checkbox can be checked/column applies to 10 rows,and don't allow to key numbers in.

  1. #1
    Registered User
    Join Date
    12-05-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1

    1 checkbox can be checked/column applies to 10 rows,and don't allow to key numbers in.

    Hello. I'm a newbie here. I really need help to create survey using excel 2010.

    I have 3 choices for users to choose from; 2 checkboxes, and 1 cell which allow them to key in only whole numbers from 1-100. They can only select 1 choice out of the 3.

    What I need is that;
    1. They can keys in number only if they don't select any checkboxes.
    2. If they select one of the checkbox, the other checkbox will be unchecked automatically and the number that they may key in earlier, need to be erase. Or if they've already checked one of the checkbox and decide to key in number later, it'll either show the message to not allow them to key in number or the checked checkbox will be automaticallly unchecked, whichever works is fine for me.
    3. It should work like this for all other rows as well.

    I tried to work with this for two days now. I can write vb a little bit, but the codes didn't work with excel. And I don't know why when I create codes in excel, it show message that macro is disabled on the file, while I have enabled macros for the file already.

    So, I need help with both how to write the codes and also how to makes it works on excel file as well. I have attached the example of the file I'm working on too.

    I hope my question is clear and that someone can help me. Thank you very much for your time.


    PS. This is the code I write with VB, it works fine there but didn't work with excel.

    Public Class Form1

    Private Sub CheckBox1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox1.CheckedChanged
    If CheckBox1.CheckState = CheckState.Checked Then
    CheckBox2.CheckState = CheckState.Unchecked
    TextBox1.Clear()

    End If
    End Sub

    Private Sub CheckBox2_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles CheckBox2.CheckedChanged
    If CheckBox2.CheckState = CheckState.Checked Then
    CheckBox1.CheckState = CheckState.Unchecked
    TextBox1.Clear()

    End If
    End Sub
    End Class
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: 1 checkbox can be checked/column applies to 10 rows,and don't allow to key numbers in.

    hi lovelypaint, welcome to ExcelForum, option to make it. Save and open attachment, try to check/uncheck checkboxes and put values in E7:E16
    Attached Files Attached Files
    Last edited by watersev; 12-08-2012 at 07:59 PM.

+ 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