I want a check box 2 B visible, that is - not dimmed out, but still 2 keep it locked for changes.
If I enable it, it is exposed 2 changes, if I disable it, it is dim !!!!
' If the flag is TRUE then whatever is typed the textbox will ingore.
private sub Textbox1.keypress (keyascii as integer)
If fIgnoreInput then keyascii=0
end sub
Have fun ...
ARISTON Engineering Ltd
Michael Vezyrgianopoulos
R&D Manager
Just set the CheckBox.Value to what you want in the Click event;
If it is to be always checked:
Code:
Private Sub Check1_Click
Check1.Value = vbChecked
End Sub
If you need to set it in code elsewhere, just set up a Public Long to store it's value and then refer the Click event to that variable.
Public IsChecked as Long
....
Private Sub Check1_Click
Check1.Value = IsChecked
End Sub
Another procedure will set the value:
...
Check1.Value = vbChecked
isChecked = vbChecked
The values available are:
vbChecked
vbUnchecked
vbGrayed Let me know if this helps
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
So, 1 by 1:
Vb5prgrmr: this works rather nice, I found it useful.
vemix: I have a problem with your code, besides the fact that it is 4 a Textbox, the "Textbox1.keypress" (dot) in between the two definitions seems 2 pose a problem, what did U mean?
johnwm: the "10 kinds of sexes U were talkin about...", well, the can all B undone from their first state, HOW DO I USE THE GREYED STATE BUT STILL PREVENT THE USER FROM CHANGING IT'S CURRENT STATE? THE FRAME IDEA FROM Vb5prgrmr seems 2 work quite well...!?!
vemix: no harm done, thanks anyways...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.