Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Posts
    32

    Invalid outside procedure error

    I inadvertently deleted some vb code and now I am getting a compile error that states: "Invalid outside procedure". This error is showing up in the Option Compare Database Statement. I am new to the vb world and do not understand what this means. Any ideas on how I can fix this problem?

  2. #2
    Join Date
    Jul 2003
    Location
    Frankfurt, Germany
    Posts
    20

    Re: Invalid outside procedure error

    hi salky

    this error usually appears when the compiler encounters some code that is supposed to be INSIDE a procedure
    for example the statement
    "exit sub"
    cannot stand outside a "sub ... end" sub block because then there would be no sub to exit from, right?

    so what obviously happened by deleting code is, that now you got some code left, which is missing itīs beginning "sub..." statement

    good luck
    cr

    ps:
    if u delete code accidently more often, itīs probably a good idea to export your libraries ifrom the project explorer from time to time ;-)

  3. #3
    Join Date
    May 2003
    Posts
    32

    Re: Invalid outside procedure error

    thank you for your help, cr. Your advice put me in the right direction to fix this issue.

    Originally posted by citizen.ron
    hi salky

    this error usually appears when the compiler encounters some code that is supposed to be INSIDE a procedure
    for example the statement
    "exit sub"
    cannot stand outside a "sub ... end" sub block because then there would be no sub to exit from, right?

    so what obviously happened by deleting code is, that now you got some code left, which is missing itīs beginning "sub..." statement

    good luck
    cr

    ps:
    if u delete code accidently more often, itīs probably a good idea to export your libraries ifrom the project explorer from time to time ;-)

Posting Permissions

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