I get a "Type Mismatch" for this line of code:
VB Code:
If RegReadSZ(HKEY_LOCAL_MACHINE, strSubKey, "Reg_FirstTime", strRet) <> "No" Then
Printable View
I get a "Type Mismatch" for this line of code:
VB Code:
If RegReadSZ(HKEY_LOCAL_MACHINE, strSubKey, "Reg_FirstTime", strRet) <> "No" Then
What function does RegReadSZ do?
I've had that error in the past when a reg key doesn't exist so I've used this. (using your example)
VB Code:
Dim sKey as String sKey = RegReadSZ(HKEY_LOCAL_MACHINE, strSubKey, "Reg_FirstTime", strRet) If sKey <> "" Then If sKey <> "No" Then 'do your stuff End If End If
thanks :D
That looks awfully like some code I've created at some time. If it is, then RegReadSZ returns a Long error code. The string Value "No" (or whatever) is returned in strRet. (It's just my way of returning a code as well as a Value)Quote:
Originally Posted by dclamp