+ Reply to Thread
Results 1 to 3 of 3

Checkbox Userform Question

  1. #1
    Registered User
    Join Date
    03-03-2005
    Location
    Toronto, Ontario, Canada
    Posts
    8

    Checkbox Userform Question

    Hello,

    I've created a userform with 4 checkboxes on it.

    When a user checks a box, I want it to select a specific column.

    So if the user does not want a specific column of data, they will leave the box blank.

    I then want a submit button that will take all the selected columns, copy them, and then paste them into a new workbook

    Any help with this would be appreciated!

    Thanks

  2. #2
    Registered User
    Join Date
    03-03-2005
    Location
    Toronto, Ontario, Canada
    Posts
    8
    I got the form to work using this code:

    Private Sub CheckBox9_Click()
    If CheckBox9.Value = True Then
    Range("k2:k10000").Select
    End If
    If CheckBox9.Value = False Then
    Range("A1").Select
    End If
    End Sub

    but when i click on another checkbox, the selection dissappears and the next checkbox is selected. Is there a way to continue the selection when i click multiple checkboxes?

    Thanks!

  3. #3
    Registered User
    Join Date
    03-03-2005
    Location
    Toronto, Ontario, Canada
    Posts
    8
    I know I can manually put in all the data like this:

    Private Sub CheckBox1_Click()
    If CheckBox1.Value = True Then
    Range("b2:b10000").Select
    End If
    If CheckBox1.Value = False Then
    Range("A1").Select
    End If
    If chkproduct.Value = True Then
    Range("a2:b10000").Select
    End If
    If chkproduct.Value = False Then
    Range("b2:b10000").Select
    End If
    If CheckBox2.Value = True Then
    Range("a2:c10000").Select
    End If
    End Sub

    I have a total of 13 columns, making this manual tedious way not an option...

+ 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