View Single Post
Old June 30th, 2006, 12:35 PM
kritimehrotra kritimehrotra is offline
Authorized User
Join Date: Jun 2006
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default On Load: "Invalid Outside Procedure"

I have an error message popping up when I load a form, saying:

The expression On Load you entered as the event property setting produced the following error:
Invalid Outside procedure.
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure]
* There may have been an error evaluating the function, event, or macro.

This is my entire function:

Private Sub Form_Load()
    NavigationButtons = False
End Sub

Also, this was working completely fine, until I added an array declaration in the Declarations section. Earlier, my declaration section only had:

Option Compare Database
Option Explicit

Now it has:

Option Compare Database
Option Explicit
Dim regions(1 To 8) As String
   regions(1) = "Atlanta"
   regions(2) = "GTA"
   regions(3) = "Huron Rideau"
   regions(4) = "North-West Territories"
   regions(5) = "Pacific"
   regions(6) = "Prairie(s)"
   regions(7) = "Quebec"
   regions(8) = "Other"

I added this because I would be using the array from other Subs in the module.

Could anyone tell me why this is giving me an error?

Thank you!