|
|
#1 |
|
Hyperactive Member
Join Date: Jun 05
Location: in Poland
Posts: 390
![]() |
Hi All
I looking on this Forum and didn't find this what i want I have the array of checkbox's. All it be placed on a one form. They make possible choosing any configurations to calculations for user. However not all they are accidental but some this create an dependence. So, I want to make it. For e.g. If I made vbChecked let's say for chk(1) which I have named The Cars, then should be also made vbChecked let's say for chk(5) named Porshe and let's say for chk(10) named Jeep. But....If I will want to make vbUnchecked for chk(10) this example, then I should can to do it. The statement of condition it will not here useful. Because then can't - in reference to above mentioned example - to make chk(10) vbUnchecked without switch off this chk(1). Simply I want I has it a dependent in one direction but in a second direction already no I hope it will good understood Someone know how to make it, thanks in advance for some help me
__________________
I know, I know, my English is bad, sorry ..... Last edited by Tamgovb; May 19th, 2007 at 06:22 AM. |
|
|
|
|
|
#2 |
|
Re: A Big problem with CheckBox array
What is wrong with this?
Code:
Private Sub chk_Click(Index As Integer)
Select Case Index
Case 1
If chk(1).Value = vbChecked Then
chk(5).Value = vbChecked
chk(10).Value = vbChecked
End If
End Select
End Sub
__________________
Tips, Examples & Tutorials: A valuable forum tool • Generate unique TreeView keys • TreeView with "open" and "closed folder" icons • Time code using GetTickCount • How to trap the Tab key • Scroll a form • NumberBox ActiveX control • Color a ListView row • An InputBox form • How to use SaveSetting and GetSetting • A program registration scheme • Spellcheck a Textbox • Resize controls • Open Windows Explorer at Last Visited Path • A Blackjack Game • Count lines of code • Please go to the Thread Tools menu and click Mark Thread Resolved when you have your answer. If someone helped you today then please consider rating their post.
|
|
|
|
|
|
|
#3 | |
|
Hyperactive Member
Join Date: Jun 05
Location: in Poland
Posts: 390
![]() |
Re: A Big problem with CheckBox array
Thanks Martin
Orginally posted by Martin Liss Quote:
I thought about the statement of condition as about single procedure - obviously for this example. I will admit, that I didn't thought about CASE procedure. However using with your prompt at last I made it so. It fine work. Code:
Dim lValue As Long
lValue = chk(Index).Value
Select Case Index
Case 1
chk(5).Value = lValue
chk(10).Value = lValue
End Select
End Sub
__________________
I know, I know, my English is bad, sorry ..... |
|
|
|
|
![]() |
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|