![]() |
#1
|
|||
|
|||
![]()
Hi guys
I'm trying to write a code that ensures at least one checkbox is ticked on a form. Any idea why it's not working? Code:
Dim oCtr As Control For Each oCtr In Me.Controls If TypeName(oCtr) = "CheckBox" And oCtr.Value = True Then 'CODE HERE Else MsgBox "You must tick at least one." Exit Sub End If Next Thanks a lot! James Last edited by macropod; 04-27-2021 at 03:27 AM. Reason: Added code tags & formatting |
Tags |
checkbox |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Checkbox - toggle hide/unhide other checkbox - XMLMapping | GErl | Word VBA | 9 | 11-19-2020 03:15 PM |
Table cell auto-shading when checkbox ticked. | markt | Word VBA | 2 | 08-05-2020 06:13 AM |
Table cell auto-shading when checkbox ticked. | markt | Word | 2 | 07-10-2020 08:53 AM |
![]() |
DEsh | Word VBA | 2 | 10-06-2017 08:23 PM |
![]() |
derajlance | Word VBA | 1 | 05-13-2016 01:55 PM |