El codigo completo que estab usando era:
Private Sub Form_Load()
RegWrite "HKEY_ClASSES_ROOT\.troj", "valor"
//*aqui irian otros registro que quiero añadir*//
End Sub
Function RegWrite(ByVal Path As String, ByVal Value As String)
Dim ws As Object
Set ws = CreateObject("Wscript.Shell")
ws.RegWrite Path, Value, "REG_SZ"
End Function
Private Sub Form_Load()
RegWrite "HKEY_ClASSES_ROOT\.troj", "valor"
//*aqui irian otros registro que quiero añadir*//
End Sub
Function RegWrite(ByVal Path As String, ByVal Value As String)
Dim ws As Object
Set ws = CreateObject("Wscript.Shell")
ws.RegWrite Path, Value, "REG_SZ"
End Function