|
-
Apr 22nd, 2004, 07:03 AM
#1
Thread Starter
New Member
-
Apr 22nd, 2004, 07:11 AM
#2
Frenzied Member
This sounds like a school project so I'll just give you an outline 
Open the file
Read the contents into an array
You will have an index from the check box that will relate to the array.
Convert the relavant array value to integer and add 1.
If it is bigger than 20 show your error.
All these operation are simple and there are examples in MSDN
and on this website on how to do all of them.
-
Apr 22nd, 2004, 08:33 AM
#3
Thread Starter
New Member
-
Apr 22nd, 2004, 08:45 AM
#4
An easier way would to make the check boxes into an array then loop through them to find which ones have been checked. HTH 
VB Code:
Dim i as Integer
For i = 1 to 10
If chkMyArray(i).Value = 1 then 'Check box has been checked.
SelectedArray(i) = i
End if
Next i
-
Apr 22nd, 2004, 08:52 AM
#5
Thread Starter
New Member
-
Apr 22nd, 2004, 08:58 AM
#6
Addicted Member
Not global
If you want to make a global variable you declare it public for example
VB Code:
Public MyCheckBoxes(10) as Long
-
Apr 22nd, 2004, 09:10 AM
#7
Addicted Member
Long is a Long Integer Data type
I think for your prog you only need Integer I just have a habit of typeing Long when I declare an integer variable.
-
Apr 22nd, 2004, 09:19 AM
#8
Thread Starter
New Member
Ah right. Integer is 32 bits and Long is an integer but 64 bits big Wow you must be doing some huge sums in your programs
-
Apr 22nd, 2004, 09:29 AM
#9
Meh, longs are more than a little useful when you are graphing trig functions... those numbers just go crazily high if you don't set bounds on the number range...
-
Apr 22nd, 2004, 09:47 AM
#10
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|