title: Return value from VB6 exe Main?
body: <p>I'm getting the impression this isn't possible, but here's what I've got so far.</p>
  
  <pre><code>Sub Main()        
      On Error GoTo ErrorHandler        
      If Command$ = "" Then
          LogAction "Begin document lockdown"
          LockdownDocs
          LogAction "Lockdown complete"
      Else
          LogAction "Begin document enabling"
          EnableDocs
          LogAction "Documents have be enabled"
      End If
  Exit Sub
  ErrorHandler:
      LogAction "DocLock Error " &amp; Err.Number &amp; "::" &amp; Err.Description
  End Sub
  </code></pre>
  
  <p>I want it to look something like this:</p>
  
  <pre><code>Function Main() As Boolean
      On Error GoTo ErrorHandler        
      If Command$ = "" Then
          LogAction "Begin document lockdown"
          LockdownDocs
          LogAction "Lockdown complete"
      Else
          LogAction "Begin document enabling"
          EnableDocs
          LogAction "Documents have be enabled"
      End If
      Return True
  Exit Function
  ErrorHandler:
      LogAction "Error " &amp; Err.Number &amp; "::" &amp; Err.Description
      Return False
  End Function
  </code></pre>
  
  <p>The closest I've seen is <code>Function Main() As Integer</code> in Visual Studio 2005, but I'm using VB6.</p>