|
-
May 31st, 2016, 06:04 PM
#1
Thread Starter
New Member
Syntax error
I have written the sub Below but when I call RegSetStr in a sub below
I get a request from the compiler to use a "=" sign as if its a function
Whats not making it a sub (VB6)
Private Sub RegSetStr(ByRef FullLocation_Name As String, ByRef Str As String)
Dim oReg As Object
Set oReg = CreateObject("WScript.Shell")
oReg.RegWrite FullLocation_Name, Str, "REG_SZ"
Set oReg = Nothing
End Sub
Private Function GetWinReg(ByRef LocationName As String) As String
Dim Str As String
Dim Zeros As String
Dim BaseLoc As String
Zeros = "00000"
BaseLoc = "SOFTWARE\Microsoft\Windows\TestProgram"
RegCreateKey (BaseLoc)
GetWinReg = RegGetStr(BaseLoc & LocationName)
If Len(GetWinReg) < 1 Then
RegSetStr(BaseLoc & LocationName, Zeros) ???????? error = BaseLoc
GetWinReg = Zeros
End If
End Function
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|