-
Megatron, do you remember you gave me a code about saving the status o checkboxes?
well, i created some more checkboxes and I need to save them in another file.
The code you gave me saves all of the checkboxes in the form and when i load it, all of them are checked.
Can you give me a code that saves only the array named chk?
Please... I'm in a hurry.
-
So you want to save an array of CheckBoxes?
To Save
Code:
Open "MyCheckFile.txt" For Output As #1
For I = Check1.LBound To Check1.UBound
If Check1(I) = Checked Then Write #1, I
Next I
Close #1
To Load
Code:
For I = Check1.LBound To Check1.UBound
Check1(I) = Unchecked
Next I
Open "MyCheckFile.txt" For Input As #1
Do While Not EOF(1)
Input #1, tmp
Check1(tmp) = Checked
Loop
Close #1
-
Registry!
Why not save everything to the registry instead?
Files get lost, the registry stays in one place! :rolleyes:
-
Until it gets corrupted...
-
It is much more easier for me to do it in files instead of registry.
besides, files can be transfered and backuped while registry is hard and untransferrable.
ThanX Megatron, it works
ThanX Dennis, but it doesn't
-
I didnt reply to this thread.
-
He might have been referring to his previous thread.
-
Megatron, you are going to be credited in app (ofcourse in your permission)
Also, Dennis is going to be credited.