I've got a problem here that I can't figure out....
I have a check box (if the user wants to edit a setting), followed by a node
name, left node text & right node text ('node' is just for it to be easier
for me - when it loads up in another form, it loads in a tree)
If the checkbox is checked - I want the user to be able to edit all three
boxes - previously, to save the settings, I just used
'SaveSetting App.Title, "Settings", "UDCNode1", strNodeText(1) ....through 7
'SaveSetting App.Title, "Settings", "UDCLeft1", strLeftText(1) ....through 7
'SaveSetting App.Title, "Settings", "UDCRight1", strRightText(1) ....through
7
I can't seem to do a for next loop for this - however, that's not the
problem -- what I'm trying to do now --- is --- if strNodeText(x) ="" then -
IF there's a setting in the registry - I want to delete it...so I tried a
loop here:
Dim x As Integer
Dim z As Integer
For x = 1 To 7
z = (x - 1) ' because it's a checkbox array - zero based
If chkEdit(z).Value = True Then
If strNodeText(x) <> "" Then
SaveSetting App.Title, "Settings", "UDCNode" & x, strNodeText(x)
SaveSetting App.Title, "Settings", "UDCLeft" & x, strLeftText(x)
SaveSetting App.Title, "Settings", "UDCRight" & x, strRightText(x)
Else
DeleteSetting App.Title, "Settings", "UDCNode" & x,
strNodeText(x)
DeleteSetting App.Title, "Settings", "UDCLeft" & x,
strNodeLeftText(x)
DeleteSetting App.Title, "Settings", "UDCRight" & x,
strNodeRightText(x)
End If
End If
End If
Next x
No matter what - it chokes on the First DeleteSetting line - it tells me:
'Wrong Number of arguments or invalid property assignment"
Can someone help me here? How do I fix this?
--
David Wier