I think there is a better way and that is through creation of a form Property. The advantage of a property is that you can update it without any unwanted side-effects, and read it whenever you want.
First add the following in the Declarations section of your formThen add a Property (which will have a Let which is used to update the value of the property, and a Get which is used to read the property) as followsCode:Private m_intCBValue(2) As Integer ' This assumes you have 3 checkboxesThen when you you want to store the future value for check1(0), do CheckBoxValue(0) = vbChecked instead. By the way, I believe you should always use the vbChecked and vbUnChecked builtin constants instead of 0 and 1 since the constants are self-documenting. When you want to actually set the value of check1(0), then do Check1(0).Value = CheckBoxValue(0)Code:Public Property Get CheckBoxValue(ByVal intIndex As Integer) As Integer CheckBoxValue = m_intCBValue(intIndex) End Property Public Property Let CheckBoxValue(ByVal intIndex As Integer, ByVal intValue As Integer) m_intCBValue(intIndex) = intValue End Property
------------------
Marty
[This message has been edited by MartinLiss (edited 12-02-1999).]




Reply With Quote