Ok I am stuck on something very simple and can figure out what I am doing wrong. I am passing this a value from HSTouch and it seems to be passing correctly. My write to the log comes out just fine the value passed from HSTouch is exactly as I would expect but no matter what I do the Y value assigned in the Case argument comes out as 999. Basically even though though X is equal to Kitchen which should return 1 it still returns 999. What have I done wrong here?
Thanks in advance.
Sub Main(ByVal parm As Object)
Dim X As string
Dim Y As Integer
X = parm(0)
X = X.Trim
Select Case X
Case "Kitchen"
Y = 1
Case "Adams Office"
Y = 430
Case "Living Room"
Y = 2
Case Else
Y = 999
End Select
hs.writelog("Test", "This is parameter X: " & X.ToString)
hs.writelog("Test", "This is parameter Y: " & Y.ToString)
End Sub
Thanks in advance.
Sub Main(ByVal parm As Object)
Dim X As string
Dim Y As Integer
X = parm(0)
X = X.Trim
Select Case X
Case "Kitchen"
Y = 1
Case "Adams Office"
Y = 430
Case "Living Room"
Y = 2
Case Else
Y = 999
End Select
hs.writelog("Test", "This is parameter X: " & X.ToString)
hs.writelog("Test", "This is parameter Y: " & Y.ToString)
End Sub
Comment