DeleteSetting Question 
Author Message
 DeleteSetting Question

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



Tue, 03 Aug 2004 10:50:16 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Invalid procedure Call when using Access95 DeleteSetting

2. deletesetting

3. DeleteSetting help for newbie

4. DeleteSetting...What am I doing wrong?

5. DeleteSetting

6. deleteSetting gives error in vb4/16

7. Bug in DeleteSetting function

8. DeleteSetting in vb4/16 Syntax Error

9. Help Using Deletesetting with my own Ini files

10. DeleteSetting: Does this work in VB?

11. DeleteSetting Woes (VB4)

12. SaveSetting and DeleteSetting calls

 

 
Powered by phpBB® Forum Software