Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default dialogue box problem

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default dialogue box problem

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default dialogue box problem

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dialogue Box Flat disgusted Excel Discussion (Misc queries) 2 May 20th 08 06:46 PM
dialogue pop up Micayla Bergen Excel Discussion (Misc queries) 5 June 23rd 06 10:45 PM
pop up dialogue box Micayla Bergen New Users to Excel 1 June 23rd 06 02:34 AM
pop up dialogue Micayla Bergen Excel Discussion (Misc queries) 0 June 23rd 06 02:22 AM
Dialogue Box Ed Excel Programming 0 February 10th 04 06:30 PM


All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"