Re: Error Message VB6

Tech-Archive recommends: Fix windows errors by optimizing your registry



When I unload the form I want to save the path.

Private Sub Form_Unload(Cancel As Integer)
If txtPath <> "" Then
SaveSetting "MyappName", "Path", "drive", "c:"
SaveSetting "MyappName", "Path", "folder", "\", txtPath
End If

Q. If I load the form do the search and then unload the form
this code works, but if I load the form do the search then hide
the form do other things and then try to unload the form with all
the others before I use 'End' I get the following error:-Wrong
Number of Arguments,or Invalid Property as I want to hide the
form and close at the end of the program can anyone offer a
solution please.

OK now that I have removed the word 'End' from my program close button I
still get the same error can you help further please?

In the above Form_Unload procedure, the second SaveSetting statement has 5
arguments supplied to it... the SaveSetting statement only takes 4
arguments, so I would guess that is the source of your "Wrong Number of
Arguments" error.

Rick


.


Quantcast