You'll need to load the Reference to ActiveHomeScript 1.0 type library
This is what I do in VB6 and it works for me.
You could also drop the ActiveHome Control on the form: you have to add it with the components first, though. That's probably what that guy meant when he said to use the ActiveHome1: that's the name it's automatically given if it's dropped on the form. The control works in much the same way as just using a reference. The following code is using the reference to the library.
Option Explicit
Private WithEvents myActiveHome as ActiveHome
Private Sub Form_Load ()
On error goto ActiveHome_ERROR
Dim lngReturn as long
set myActiveHome = New ActiveHome
lngReturn = myActiveHome.queryplc ("a1 on")
If lngReturn = 1 then
myActiveHome.sendaction "sendplc", "a1 off"
Else
myActiveHome.sendaction "sendplc", "a1 on"
EndIf
Exit sub
ActiveHome_ERROR:
msgbox err.description, vbInformation, "Error"
End Sub
Private Sub myActiveHome_RecvAction(ByVal bszAction As Variant, ByVal bszParm1 As Variant, _
ByVal bszParm2 As Variant, ByVal bszParm3 As Variant, ByVal bszParm4 As Variant, ByVal bszParm5 As Variant, ByVal bszReserved As Variant)
' the bszAction should be recvplc, recvrf, etc.
' the bszParm1 should be the House Address: e.g. a1, b12, etc.
' bszParm2 should be the state: e.g. on, off, etc.
' You can figure out the others
Debug.Print bszAction, bszParm1, bszParm2, bszParm3, bszParm4, bszParm5, bszReserved
End Sub