title: ActiveX component can't create object: 'GetObject' Infopath
body: <p>I am trying to create a new user in ActiveDirectory with the following code:</p>
  
  <pre><code>Sub CTRL1_12_OnClick(eventObj)
   Set objOU = GetObject("LDAP://OU=Users,dc=mfcvt,dc=local")
   Set objUser = objOU.Create("User", "cn=MyerKen")
   objUser.Put "sAMAccountName", "myerken"
   objUser.SetInfo
  End Sub
  </code></pre>
  
  <p>This code is set to run from Infopath when I click on button CTRL1_12.  But when I do run it all I get is this error:</p>
  
  <pre><code>Infopath cannot complete this action, because of an error in the form's code.    
  The following error occurred:
  
          ActiveX component can't create object: 'GetObject'
          File:script.vbs
          Line:20
  </code></pre>
  
  <p>Thanks for looking</p>
  
  <p>Peter</p>