PRB: OPTION PRIVATE Statement Has No Effect in Visual Basic

Last reviewed: September 29, 1997
Article ID: Q129895
The information in this article applies to:
  • Standard and Professional Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, Version 4.0

SYMPTOMS

Using the statement Option Private when declaring a module does not affect the behavior of a Visual Basic version 4.0 application in any way.

CAUSE

The Option Private statement is not implemented in Visual Basic version 4.0. It is useful only in applications that support multiple projects loaded simultaneously and allow references between the loaded projects, as Microsoft Excel version 5.0 does for example. The statement makes it impossible to access members of the module from a referencing project even if the member is declared public.

STATUS

This behavior is by design. Because Visual Basic version 4.0 doesn't support multiple loaded projects, this statement has no use.

Keywords          : PrgOther VB4ALL VB4WIN vbwin GnrlVb kbprg
Technology        : kbvba
Version           : WINDOWS:4.0
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.