|
-
Mar 21st, 2000, 12:14 AM
#1
Thread Starter
New Member
I want to lock a CheckBox there's no .Locked property on CheckBox and I DON'T WANT TO DISABLE IT.
So if some one have hints, please Help.
MageMinds
-
Mar 21st, 2000, 12:38 AM
#2
Fanatic Member
Hi MageMinds,
Assuming that you don't want to make it invisible, you can try this code:
in the click event of the check box. This will always keep it unchecked. Change 0 above to 1 if you always want it checked. However, it's neater to manipulate the check box by disabling or enabling it. But you don't want to do that for some reason. 
Hope this helps.
-
Mar 21st, 2000, 12:42 AM
#3
Thread Starter
New Member
I have tried to set the NOT value on the CLick Event but when I change it at Run Time the Click event is trigged, well I run Stack Overflow.
The CheckBoxes doesn't have always the same value, values are from a Database.
[Edited by MageMinds on 03-21-2000 at 12:43 PM]
-
Mar 21st, 2000, 12:46 AM
#4
Junior Member
Try this:
Code:
Option Explicit
Private blDoneCheck As Boolean
Private blWanttoLock As Boolean
Private Sub Form_Load()
blWanttoLock = False
End Sub
Private Sub Check1_Click()
If blWanttoLock = True Then
If blDoneCheck = True Then
blDoneCheck = False
Exit Sub
End If
If Check1.Value = 0 Then
blDoneCheck = True
Check1.Value = 1
Else
blDoneCheck = True
Check1.Value = 0
End If
End If
End Sub
You need to have something like "blDoneCheck" because if you
do check1.value = 0 it fires the Check1_Click event again and it will loop eternelly...
-
Mar 21st, 2000, 12:54 AM
#5
Thread Starter
New Member
Thanks a lot ... I was looking for an API to do the job but it's working fine ...
MageMinds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|