Click to See Complete Forum and Search --> : Which is wrong about array set


YKQ
April 10th, 2001, 11:30 PM
Hello;
I first use VB++.
My code like this :
Dim sObject(1 To 3) As CheckBox
sObject(1) = Sheet2.CheckGAI10
sObject(2) = Sheet2.CheckGAI11
sObject(3) = Sheet2.CheckGAI12
But debug is error.
How to do?
Welcome any advices.
Thank you very much.

Cimperiali
April 11th, 2001, 02:29 AM
I assume matter is not in Sheet2.CheckGAI10 (you can access those objects, can you?). If this is correct, then try...

set sObject(1) = Sheet2.CheckGAI10

do not forget before unloading to write
set sObject(1) = nothing

Hope it solve your matter.

Special thanks to Lothar "the Great" Haensler. Come back soon, you Guru.