title: Object doesn't support this property or method in my HTA App
body: <pre><code>Sub UserID
      Dim objNetwork
      objNetwork = CreateObject("WScript.Network") 'This is where I get the message
      Dim struserid
      struserid = objNetwork.UserName
      If Len(Trim(struserid)) = 0 or struserid = "*" Then 
          MsgBox "Please enter a valid username.",48,"Invalid entry"
          Exit Sub
      End If
  </code></pre>
  
  <p>I used this code in another sub routine of my app and it works fine. </p>
  
  <p>However when I use this in this subroutine, I got this error:</p>
  
  <blockquote>
    <p>Object doesn't support this property or method.</p>
  </blockquote>