Announcement

Collapse
No announcement yet.

Instr throwing error: Expression expected

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Instr throwing error: Expression expected

    TIA!

    Thought this would be simple to convert to do an instring search.

    changing this...

    If objDevice.Name(hs) = Window_sNAME Then

    to this : If Instr(objDevice.Name(hs),Window_sNAME) > 0 = Then
    or this : If Instr(strDevName,Window_sNAME) > 0 = Then

    where :
    Window_sNAME ... a string
    intDevRef = objDevice.Ref(hs) ... a string


    but I only get log error...
    Compiling script C:\Program Files (x86)\HomeSeer HS3\scripts\CompositeDevices.vb: Expression expected.



    #2
    Remove the equals sign in red:

    If Instr(objDevice.Name(hs),Window_sNAME) > 0 = Then
    Jon

    Comment


      #3
      Originally posted by jon00 View Post
      Remove the equals sign in red:

      If Instr(objDevice.Name(hs),Window_sNAME) > 0 = Then
      thank you!

      This is what I get for staying up late when I'm exhausted, just to do a "quick change" ... I miss things staring right at it!

      Comment

      Working...
      X