Hi there,
You may want to set Option Explicit and Option Strict on to have the compiler tell you about these problems at compile time. Take a look at this:
Private Function ReadWriteCURegistry(ByVal subkey As String,
Optional ByVal value As String = "", Optional ByVal openToWrite As
Boolean = False, Optional ByVal writetokey As String = "")
As String
Dim key As Boolean
End Function
You declare the method as a String, yet to have it return a Boolean and finally you treat the result as a Boolean. Why not declare the method as a Boolean method?
Private Function ReadWriteCURegistry(ByVal subkey As String,
Optional ByVal value As String = "", Optional ByVal openToWrite As
Boolean = False, Optional ByVal writetokey As String = "")
As Boolean
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004