1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Need help with CheckBox code, excel

Discussion in 'Business Applications' started by Student1000, Aug 10, 2007.

Thread Status:
Not open for further replies.
  1. Student1000

    Student1000 Thread Starter

    Jul 1, 2007
    OK, i want to have multiple checkboxes adding values to range(B42:B60) but i have two
    big problems. First, i want to make the value disappear if the corresponding checkbox is unchecked.
    Second, for some reasons i can not make the check boxes add values beyond the fist one/two rows of column B. I did it before when i was testing the code(blank sheet) but now on the real project(lots of values) it doesnt work.:confused:
    Below is the code. I dont remember doing anything different to it when i was testing it.

    See if you can help me. Thanks.

    Private Sub CheckBox1_Click()
    If CheckBox1 = True Then

    Dim NextCell As Range
    'Set NextCell to last unavailable cell beyond D4 (next cell is available)
    Set NextCell = Sheet1.Range("B42").End(xlDown)
    'Quit if no place to put value (next available cell is beyond row 20)
    If NextCell.Row < 32000 And NextCell.Row > 29 Then Exit Sub
    If NextCell.Row > 32000 Then Set NextCell = Range("B42")

    NextCell.Offset(1).Value = "Thank you for choosing our services. We appreciate your business."

    End If

    End Sub
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/607822

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice