title: When is "Set" required in lotus script when setting an environment variable
body: <p>I've inherited a nightmare of a project from the days when I can only assume LOC was an acceptable KPI in lotus script. I'm working on refactoring repetitive code after I've been asked to make a change to how our company's apps work. The code below illustrates something I don't understand about the syntax of Lotus Script -- I'm getting an error in the domino designer that on the "Control = UIDoc.Document....." line that A "Set" is required. Looking at existing code, sometimes Set is used for assignment, sometimes it is not. I'm trying to read the lotus script doc's, but haven't yet found an explanation of the difference. Any change someone could illuminate me on when Set should be used and when it should not? If it helps I have a strong C# background with some minor experience in interpreted languages like JS and PHP</p>
  
  <pre><code>Class DeploymentType
  Private ProductName As String
  Private ControlSuffix As String
  Private TypeHeader As String
  Private Control As NotesRichTextItem
  
  Sub new (Product As String, Suffix As String, Header As String, UIDoc As NotesUIDocument)
      'These three assignments do not show an error without set
      ProductName = Product
      ControlSuffix = Suffix
      TypeHeader = Header
      'This assignment shows an error unless I prepend it with "Set"
      Set Control = UIDoc.Document.GetFirstItem(ProductName + ControlSuffix)
  End Sub
  </code></pre>