checkbox grouped

Fyr

Active Member
Joined
Jan 20, 2009
Messages
375
I have 9 checkboxes grouped as "section".

If one checkbox is checked, i want to add it to my worksheet along with other values from textboxes.
Here is a script I came up with, but it breaks on line 1.

Code:
Private Sub CommandButton1_Click()
Sheets(s).Cells(Sheets(s).Range("A65536").End(xlUp).Row + 1, 1) = section & " - " & first & " " & last
    Range("A3:A46").Select
    ActiveWindow.SmallScroll Down:=-21
    Selection.Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
    Range("A1").Select
End Sub
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
If section, first and last are all controls on the form that your are working with try:
Code:
Sheets(s).Cells(Sheets(s).Range("A65536").End(xlUp).Row + 1, 1) = Me.section & " - " & Me.first & " " & Me.last
for your first row.

I do not understand what "value" you intend to get out the the 'section' frame which contains checkboxes
 
Upvote 0

Forum statistics

Threads
1,214,815
Messages
6,121,715
Members
449,049
Latest member
THMarana

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top