+ Reply to Thread
Results 1 to 7 of 7

Can't automatically add checkboxes when adding rows

  1. #1
    Registered User
    Join Date
    10-14-2011
    Location
    San Antonio, TX
    MS-Off Ver
    Excel 2010
    Posts
    3

    Thumbs up Can't automatically add checkboxes when adding rows

    Hello,
    First let me say that this site is great. I have learned a lot but still have a lot of stuff I have no clue about.
    I have a form that we use for custom pricing.
    I want to add check boxes starting at cell T17 through T36.
    If possible, when I had a row I would like the check box to populate

    Also, i some what understand how to assign a check box to a cell but can a macro automatically do this?


    I appreciate any assistance.
    Thank you
    BCurry
    Last edited by bcurry3; 11-04-2011 at 09:32 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Can't automatically add checkboxes when adding rows

    Hello,

    check boxes should be used in user forms, not in cells. If you add a check box, you need code to evaluate if the box is ticked or not in order to do something with it.

    Instead, use a regular cell, format it with the Marlett font and enter an "a" (without the quotes) for a check mark.

    You can then use that cell value in formulas, for example to sum all rows where that column contains an "a".

    To do that with check boxes would be way more complicated.

    cheers,

  3. #3
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Can't automatically add checkboxes when adding rows

    Code can add a checkbox. I agree that using the Marlett font might be better though.
    Record a macro creating a checkbox, then modify the macro to create as many checkboxes that you want.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

  4. #4
    Registered User
    Join Date
    10-14-2011
    Location
    San Antonio, TX
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Can't automatically add checkboxes when adding rows

    Thanks for the response. So if I use Marlett font, which I will, what would be the easiest way to make certain data from one worksheet transfer to another worksheet if the box is checked?

    So if T17 on "bid list" is checked I would want c17 on "bid list" to show on c17 on the "links plus custom pricing form" worksheet

  5. #5
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Can't automatically add checkboxes when adding rows

    This will just get you started. Put this in the Sheets("Bid List") module.
    Please Login or Register  to view this content.
    Last edited by foxguy; 11-03-2011 at 09:37 PM.

  6. #6
    Registered User
    Join Date
    10-14-2011
    Location
    San Antonio, TX
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Can't automatically add checkboxes when adding rows

    Thanks foxguy,
    I am probably doing something wrong but when I put this code into the "bid List" I get this error:

    Ambiguous name detected: Worksheet_change

  7. #7
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Can't automatically add checkboxes when adding rows

    That error is saying that you have 2 "Worksheet_Change" subs in the same module. You will need to combine the 2 into 1 which shouldn't be a problem.

+ 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