+ Reply to Thread
Results 1 to 7 of 7

Creating a Check/Guestlist

Hybrid View

  1. #1
    Registered User
    Join Date
    08-27-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Creating a Check/Guestlist

    Hi guys,

    What I would like is to have a list of names in column 1 and a some checkboxes in column 2. When I check one of these boxes I'd like the row I've checked to vanish and for the name to be copied into a separate sheet (to indicate that they have paid)

    So far I have this code but it's sloppy and doesn't quite work as the checkbox doesn't hide and I haven't figured out how to copy the name over

    Public Sub Button2_Click()
    
    r = ActiveSheet.UsedRange.Rows.Count
    For i = 1 To r
    If ActiveSheet.Range("C" & i).Value = "True" Then
    ActiveSheet.CheckBoxes.Visible = False
    ActiveSheet.Range("C" & i).EntireRow.Hidden = True
    End If
    Next i
    End Sub
    
    
    Sub AddCheckBox()
    Dim cell As Range
    
    'DelCheckBox  'Do the delete macro
    'or delete all checkboxes in the worksheet
    ActiveSheet.CheckBoxes.Delete
    Dim LastRow As String
    LastRow = Range("A65536").End(xlUp).Row
    For Each cell In Range(Cells(1, 2), Cells(LastRow, 2))
          With ActiveSheet.CheckBoxes.Add(cell.Left, _
         cell.Top, cell.Width, cell.Height)
         .LinkedCell = cell.Offset(, 1).Address(External:=True)
         .Interior.ColorIndex = x1None   'or  xlNone or xlAutomatic
         .Caption = "Paid?"
         .Border.Weight = xlThin
         .OnAction = "Button2_Click"
           
      End With
      Next
    
    With Range(Cells(1, 2), Cells(LastRow, 2))
    .Rows.RowHeight = 15
    End With
    End Sub

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,915

    Re: Creating a Check/Guestlist

    Hi mooface. I've always found working with check boxes a little awkward. Instead of check boxes, would a drop down list in column 2 where you could choose "Paid" or "Unpaid" work for you?

  3. #3
    Registered User
    Join Date
    08-27-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Creating a Check/Guestlist

    Hi ya,

    Yeah I am starting to consider that option. The idea was for this to be functional on a Tablet/touch screen environment so I thought a check box to be the easiest, but I suppose running a drop-down list could work out... I would still need some kind of active macro to hide the rows and copy the name over to a PAID sheet, any ideas?




    Quote Originally Posted by Mumps1 View Post
    Hi mooface. I've always found working with check boxes a little awkward. Instead of check boxes, would a drop down list in column 2 where you could choose "Paid" or "Unpaid" work for you?

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,915

    Re: Creating a Check/Guestlist

    Hi again. Try the attached file. I've just entered some generic data to use as a test. The drop down list in column B goes down to row 20. If you have more names, you just have to copy the validation list down column B as far as you need it. When you choose "Paid" from the list the corresponding name will be copied to sheet "Paid". I have also included a button that will show all your names if they are hidden.
    Attached Files Attached Files

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,915

    Re: Creating a Check/Guestlist

    My apologies mooface. I found a little glitch. Please use this attachment.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-27-2013
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Creating a Check/Guestlist

    that's amazing thank you!!

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,915

    Re: Creating a Check/Guestlist

    Let's try one more time.
    Attached Files Attached Files

+ 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. Creating multiple check boxes macro
    By adamgrier in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 11-09-2009, 07:44 PM
  2. Creating macro in Excel that can add a check mark
    By marina1072 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-12-2006, 10:45 AM
  3. Creating a check digit
    By Patrick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2006, 01:25 PM
  4. Creating a Check Digit
    By Ilan in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-03-2005, 08:45 AM
  5. Creating Formula using check boxes
    By Anthony Slater in forum Excel General
    Replies: 3
    Last Post: 01-04-2005, 11:06 AM

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