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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check Box coding 1

Status
Not open for further replies.

JohnShell

Technical User
Aug 29, 2003
35
US
Thank you for you input. Have a spreadsheet customized to user's requirements. Option buttons would be better but user wanted check boxes. Placed some check boxes in frame and others not. Any suggestions on VBA syntax to make check boxes behave like option buttons - only one enabled at a time? I know I need if statement, repeated a number of times but I don't know format. So chk1, chk2, chk3, chk4 in frame. Default chk1=enabled, other 3 enabled=false. When user checks chk2 then chk1-3-4 enabled=false, etc. Hope I am making sense. Thanks again.
JohnShell
 
Hi John

Try something like:

If chk1.value = true then
chk2.value = false and chk3.value = false and _
chk4.value = false
Elseif
chk2.value = True Then
chk1.value = false and chk3.value = false and _
chk4.value = false
ElseIf
etc.......
endif

Cheers

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top