Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am a new programmer in excel. I need lock the checkbox after checkbox
checked. I tried use property locked, enabled no one works. I used click event. Need help. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe you could just disable it from future use:
Option Explicit Private Sub CheckBox1_Click() If Me.CheckBox1.Value = True Then Me.CheckBox1.Enabled = False End If End Sub Leanne wrote: I am a new programmer in excel. I need lock the checkbox after checkbox checked. I tried use property locked, enabled no one works. I used click event. Need help. Thanks. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
But I'd hate to see that (as a user). I often click on the wrong checkbox and
have to correct it. Leanne wrote: I am a new programmer in excel. I need lock the checkbox after checkbox checked. I tried use property locked, enabled no one works. I used click event. Need help. Thanks. -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Leanne,
Adapting Dave's code to acknowledge his warning, perhaps try: Private Sub CheckBox1_Click() Dim res As Long If Me.CheckBox1.Value = True Then res = MsgBox("Are you sure you meant to " & _ "check this option?", vbYesNo, "Please Confirm") If res = vbYes Then Me.CheckBox1.Enabled = False Else Me.CheckBox1.Value = False End If End If End Sub This throws up a message box if the user checks the box and asks for confirmation. Annoying, if the box was intentionally checked, but less annoying, perhaps, than being unable to undo an unintentional click. --- Regards, Norman "Leanne" wrote in message ... I am a new programmer in excel. I need lock the checkbox after checkbox checked. I tried use property locked, enabled no one works. I used click event. Need help. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to lock the Ctrl key? (as locking the Shift key w/Caps Lock) | Excel Discussion (Misc queries) | |||
how do I undo the scroll lock, thscroll lock button does not work | Excel Discussion (Misc queries) | |||
How to have Checkbox A uncheck with checked Checkbox B | Excel Discussion (Misc queries) | |||
I have lock a wookbook but one cell does not want to lock it | Excel Discussion (Misc queries) | |||
I have lock a wookbook but one cell does not want to lock it | Excel Discussion (Misc queries) |