Individual checkbox selection

IoanZ

Board Regular
Joined
Mar 2, 2018
Messages
51
Hello

This VBA code helps me to do a individual check box selection
When I select first checkbox ,Cell O18 has value 1

When I select second checkbox (first checkbox became white..second is black), and Cell O18=0 an O19=1

Please tell me which are mofication for vba code wher I want to create this situation for 10..15 checkbox.

Link for the image: https://ibb.co/c61CGo

Sub Rett_Clic()
c61CGo
Dim Sheet1 As Object
Set Sheet1 = Sheets(1)
Application.ScreenUpdating = False
If Sheet1.Range("O18") = 0 Then
With Sheet1.Shapes("Rett 1").Fill
.ForeColor.SchemeColor = 8
.Visible = msoTrue
End With
With Sheet1.Shapes("Rett 2").Fill
.Solid
.Visible = msoFalse
End With
With Sheet1
Sheet1.Range("O18") = 1
Sheet1.Range("O19") = 0
End With
Else
With Sheet1.Shapes("Rett 1").Fill
.Solid
.Visible = msoFalse
End With
With Sheet1.Shapes("Rett 2").Fill
.ForeColor.SchemeColor = 8
.Visible = msoTrue
End With
With Sheet1
Sheet1.Range("O18") = 0
Sheet1.Range("O19") = 1
End With
End If
End Sub
 
Last edited:

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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