Afternoon all, got a little query about these checkbox listboxes I've just discovered (a listbox with style option 1 selected). I have one with a big list of checkboxes and I want to be able to write to a file which ones are selected so they can be instantly recalled later, but I'm having trouble referring to each chkbox individually. With my other controls I've just been writing the values to a CSV file:
And reading them back like this:Code:Print #1, chk2001.Value & "," & chk2002.Value & "," & chk2003.Value & "," & chk2004.Value _ & "," & chk2005.Value & "," & chk2006.Value & "," & chk2007.Value & "," & chk2008.Value
Anyone have any idea's how I can do this with a chkbox lstbox ?Code:Private Sub lstSystems_Click() sName = lstSystems.Text Open syDir & "\" & sName & ".txt" For Input As #1 Line Input #1, mLine Close #1 mVals = Split(mLine, ",") chk2001.Value = mVals(0) chk2002.Value = mVals(1) chk2003.Value = mVals(2) chk2004.Value = mVals(3) chk2005.Value = mVals(4) chk2006.Value = mVals(5) chk2007.Value = mVals(6)




Reply With Quote