title: Is it possible to use a control without putting it on a form in VB6?
body: <p>I'm pretty sure about the answer to this, but I'm trying a variety of things to get a very stubborn project to work.  One idea was to try to run code through a control without defining it on a form.</p>
  
  <p>So, for example, my original code looked like this:</p>
  
  <pre><code>frmProcess.MyViewer.MaxPageSize = 100
  frmProcess.MyViewer.ResetPages
  frmProcess.MyViewer.AddPageToView "C:\TestPage1.txt"
  </code></pre>
  
  <p>I've changed it to:</p>
  
  <pre><code>Dim objViewer As MyViewer
  objViewer.MaxPageSize = 100
  objViewer.ResetPages
  objViewer.AddPageToView "C:\TestPage1.txt"
  </code></pre>
  
  <p>I get an error window with "Run-time error '91': Object variable or With block variable not set".</p>
  
  <p>But there doesn't seem to be a way to 'set' this control. Is this just impossible, or is there another way to do it that doesn't require a form?</p>
  
  <p>EDIT: I ended up abandoning this entire path of activity, as an alternate solution was found that got around the problem I was having with this form freezing. I don't want to delete this question in case someone else comes along and can benefit from the answers, which are potentially useful.</p>