Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a text box inactive using a option button

Status
Not open for further replies.

Miko18

Technical User
Nov 10, 2002
2
GB
Have 3 Check boxes, and I want so that when one of them is ticked, the a couple of text boxes become active, and you are able to type on them

but if none of the option boxes are ticked, or either of the other 2 are ticked, I need the text boxes to become in-active so it cant be typed into

very stuck
 
well, now i can think of a long method, you can biuld a method with all the options, to see how many checkboxes are checked, and then decide if the textbox should be enabled or not.
as i said, this is a long method, but it should work:

for example:
if check1.value=1 and check2.value=0 and check3.value=0 then
text1.enabled
Elseif
check1.value=1 and check2.value=1 then
....

and so on.


i hope this helps

Eli
 
You can make it like this

Private Sub Command2_Click()
If Check1 = 1 Then
Command1.Enabled = False
End If
End Sub

then it grays out button 1 and it cant be pressed.
:)

Ken Christensen
Ken@Christensen.dk

Ken Christensen Software
Support@kc-software.tk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top