Unbelievable !! (at least for me...)
Hi
I have a form with 2 ARRAYS : command1 and label1 and some code, which says :
...
label1(ind).visible = command1(ind).visible
....
[with ind = some index].
Despite the fact that some command1(ind) become visible (I explicitly set them in code), label1(ind) NEVER becomes visible, because when sampled, command1(ind).visible ALWAYS returns the value it was set at Design Time.
After lots of banging my head against various objects, I finally tried this (to make sure it happens):
...
command1(ind).visible = true
if command1(ind).visible then <some code>
...
Guess what ? The <some code> never executes !! Also, when using the Watch Window, the .Visible property of command1(ind) never changes - it stays the way I set it at Design Time ! (although it becomes visible on the form !)
Is this Christmas or Halloween ?
Have some clue ?
|