To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
Part 10 of the Visual Basic .NET 2010 Express Tutorial Complete!
How to Use the Visual Studio Code Analysis Tool FxCop
Article :: Interview with Andrei Alexandrescu (Part 3 of 3)
Introducing Visual Studio LightSwitch
Visual Studio LightSwitch Beta 1 is Available



Go Back   VBForums > Visual Basic > Visual Basic 6 and Earlier

Reply Post New Thread
 
Thread Tools Display Modes
Old May 19th, 2007, 06:16 AM   #1
Tamgovb
Hyperactive Member
 
Join Date: Jun 05
Location: in Poland
Posts: 390
Tamgovb is an unknown quantity at this point (<10)
Resolved [RESOLVED] A Big problem with CheckBox array

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.
Tamgovb is offline   Reply With Quote
Old May 19th, 2007, 08:20 AM   #2
MartinLiss
Administrator
 
MartinLiss's Avatar
 
Join Date: Sep 99
Location: Looking over your shoulder from San Jose, CA
Posts: 30,814
MartinLiss is a name known to all (1000+)MartinLiss is a name known to all (1000+)MartinLiss is a name known to all (1000+)MartinLiss is a name known to all (1000+)MartinLiss is a name known to all (1000+)MartinLiss is a name known to all (1000+)MartinLiss is a name known to all (1000+)MartinLiss is a name known to all (1000+)MartinLiss is a name known to all (1000+)
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 toolGenerate unique TreeView keysTreeView with "open" and "closed folder" iconsTime code using GetTickCountHow to trap the Tab keyScroll a formNumberBox ActiveX controlColor a ListView rowAn InputBox formHow to use SaveSetting and GetSettingA program registration schemeSpellcheck a TextboxResize controlsOpen Windows Explorer at Last Visited PathA Blackjack GameCount lines of codeV1.3Private Message ViewerCopy/Paste VB CodePaste VB Code Add-InInsert Procedure Names Add-InA calculator for the game of SpiderMy review of REALbasic 2008VB6 Debug TutorialPicture/Video ViewerVBF Photo Contest Winners

Please go to the Thread Tools menu and click Mark Thread Resolved when you have your answer.
2009-2010
If someone helped you today then please consider rating their post.
MartinLiss is offline   Reply With Quote
Old May 20th, 2007, 05:18 PM   #3
Tamgovb
Hyperactive Member
 
Join Date: Jun 05
Location: in Poland
Posts: 390
Tamgovb is an unknown quantity at this point (<10)
Re: A Big problem with CheckBox array

Thanks Martin

Orginally posted by Martin Liss
Quote:
What is wrong with this?
No, nothing in this has wrong.

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
Because in your example it didn't vbUnchecked for those controls (in your code: chk(5)) and chk(10) when I make switch off with return on a vbUnchecked for chk(1) control's
__________________
I know, I know, my English is bad, sorry .....
Tamgovb is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Visual Basic 6 and Earlier


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:29 AM.





Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.