+ Reply to Thread
Results 1 to 4 of 4

If checkbox is checked, require corresponding data to be entered

  1. #1
    Registered User
    Join Date
    01-10-2019
    Location
    Cypress, Texas
    MS-Off Ver
    2016
    Posts
    6

    If checkbox is checked, require corresponding data to be entered

    Hi all I have an excel sheet where i have a checkbox for when people use checks. What I need is some help on how to make make the checkbox field force the per person to enter a check number in the next cell and don't let them save the file until they do so. Can anybody help me please?
    Hombreck
    Last edited by 6StringJazzer; 01-10-2019 at 10:30 PM. Reason: Changed title from "Checkbox"

  2. #2
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: If checkbox is checked, require corresponding data to be entered

    You'll need to use VBA for this, if you're not sure how to do this then just ask

    You'll need to enter this code into the VBE, under "This Workbook"

    Please Login or Register  to view this content.
    You'll likely need to change this to match your sheet name and the cell value you've given to your check box;

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-10-2019
    Location
    Cypress, Texas
    MS-Off Ver
    2016
    Posts
    6

    Re: If checkbox is checked, require corresponding data to be entered

    Thanks for the help but I still need some more help like you said "just ask" what do you want me to do?

  4. #4
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: If checkbox is checked, require corresponding data to be entered

    Eeek - Sorry for the delay in getting back to you - Busy weekend!

    You'll need to access the VBE (Visual Basic Editor), access your Workbook and when it's loaded Excel press ALT & F11

    On the left hand side you'll see the Project Window, your Workbook will be listed, underneath you'll see your Worksheets listed and underneath them you'll see "ThisWorkbook".

    Double click on "ThisWorkbook" and it'll open up a window on the right hand side, this is where you need to Copy and Paste the code above. Once done you can close the VBE down.

    You might find it handy to enable the Developer Tab, you've not said which version of Excel you're using but you can find instructions on how to enable it for newer versions here;

    https://support.office.com/en-us/art...b-e5fd9bea2d45

    (There is also a link to doing enabling it for older versions there if that is the case)

    Once you've got the code in your workbook you'll need to save it as an Excel Macro Enabled Workbook to keep it in there, you should be prompted to do this when you save the Workbook, change the "Save as type" drop down box to do this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Make Worksheet Active-X CheckBox value same as Userform CheckBox value
    By L plates in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-21-2016, 08:23 AM
  2. Select All Checkboxes Checkbox That Also Calls Checkbox Macros
    By Intervigilium in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2015, 06:41 PM
  3. Protect the sheet but the form checkbox still can be change and sort by checkbox
    By carolyn1221 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-19-2014, 01:08 PM
  4. Replies: 0
    Last Post: 04-07-2014, 12:22 PM
  5. Lock cell linked to checkbox when checkbox is ticked
    By simeony003 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2013, 10:08 AM
  6. Replies: 4
    Last Post: 07-22-2013, 01:37 PM
  7. [SOLVED] How do I change a checkbox to unchecked without running the code within the checkbox
    By jsunnb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-27-2012, 09:28 PM

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