Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On an excel dialogue box with more than one checkbox is
it possible to ensure that only one of the checkboxes may be checked at any time. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assuming you are talking about a dialog that is a userform, not a built-in
Excel dialog: if you use optionbuttons instead of checkboxes, it should automatically force only one at a time to be selected. If you want to use checkboxes you would have to add some code - a sub like this for each checkbox would be needed: Private Sub CheckBox1_Click() CheckBox2 = False CheckBox3 = False .... End Sub "Lynda" wrote: On an excel dialogue box with more than one checkbox is it possible to ensure that only one of the checkboxes may be checked at any time. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am meaning an excel dialog box with checkboxes built
like this in the code . -- TopPos = 40 For i = 1 To ActiveWorkbook.Worksheets.Count Set CurrentSheet = ActiveWorkbook.Worksheets(i) ' Skip empty sheets and hidden sheets If Application.CountA(CurrentSheet.Cells) < 0 And _ CurrentSheet.Visible Then SheetCount = SheetCount + 1 PrintDlg.CheckBoxes.Add 78, TopPos, 150, 16.5 PrintDlg.CheckBoxes(SheetCount).Text = _ CurrentSheet.Name TopPos = TopPos + 13 End If Next i -- if you can shed any light then please do help Thanks Lynda -----Original Message----- Assuming you are talking about a dialog that is a userform, not a built-in Excel dialog: if you use optionbuttons instead of checkboxes, it should automatically force only one at a time to be selected. If you want to use checkboxes you would have to add some code - a sub like this for each checkbox would be needed: Private Sub CheckBox1_Click() CheckBox2 = False CheckBox3 = False .... End Sub "Lynda" wrote: On an excel dialogue box with more than one checkbox is it possible to ensure that only one of the checkboxes may be checked at any time. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dialogue Box | Excel Discussion (Misc queries) | |||
dialogue pop up | Excel Discussion (Misc queries) | |||
pop up dialogue box | New Users to Excel | |||
pop up dialogue | Excel Discussion (Misc queries) | |||
Dialogue Box | Excel Programming |