+ Reply to Thread
Results 1 to 5 of 5

Undeclared variables allowed in a Module defined with Option Expli

  1. #1
    cgr
    Guest

    Undeclared variables allowed in a Module defined with Option Expli

    A module in my project allows undeclared variables to be created even though
    Option Explicit is defined.

    Any idea why?

    The remaining modules (all defined with Option Explicit) in the project do
    not allow undeclared variables to exit.


  2. #2
    AA2e72E
    Guest

    RE: Undeclared variables allowed in a Module defined with Option Expli

    "cgr" wrote:

    > A module in my project allows undeclared variables to be created even though Option Explicit is defined.


    Are the variables that are "allowed" declared as global in the other modules?

  3. #3
    cgr
    Guest

    RE: Undeclared variables allowed in a Module defined with Option E

    No.

    "AA2e72E" wrote:

    > "cgr" wrote:
    >
    > > A module in my project allows undeclared variables to be created even though Option Explicit is defined.

    >
    > Are the variables that are "allowed" declared as global in the other modules?


  4. #4
    cgr
    Guest

    RE: Undeclared variables allowed in a Module defined with Option Expli

    I forgot to mention that the way I fixed(?) the problem was by adding a new
    module to the project, copying all of the code from the offending module to
    the new module, removing the offending module and then renaming the new
    module with the offending module's name. This worked.

    I still would like to know why Option Explicit failed in the old module.

    "cgr" wrote:

    > A module in my project allows undeclared variables to be created even though
    > Option Explicit is defined.
    >
    > Any idea why?
    >
    > The remaining modules (all defined with Option Explicit) in the project do
    > not allow undeclared variables to exit.
    >


  5. #5
    cgr
    Guest

    RE: Undeclared variables allowed in a Module defined with Option E

    No.

    "AA2e72E" wrote:

    > "cgr" wrote:
    >
    > > A module in my project allows undeclared variables to be created even though Option Explicit is defined.

    >
    > Are the variables that are "allowed" declared as global in the other modules?


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1