Unload Me

Discussion in 'Microsoft Access VBA Modules' started by Jac Tremblay, May 1, 2010.

  1. Jac Tremblay

    Jac Tremblay Guest

    Hi,
    I have a form loaded as Modal and on the Cancel Button event, I want it to
    close (or unload).

    Private Sub cmdAnnuler_Click()
    MsgBox "me.Name = " & Me.Name ' To make sure it is the right one.
    Unload Me
    End Sub
    I get an error:
    Run-time error '361':
    Can't load or unload this object

    What is the problem?
    Thanks
    --
    Jac Tremblay
     
    Jac Tremblay, May 1, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Daniel Dickover

    Unload and OnError Events

    Daniel Dickover, Nov 26, 2003, in forum: Microsoft Access VBA Modules
    Replies:
    9
    Views:
    268
    Ken Snell
    Dec 3, 2003
  2. Harold

    Excel Won't unload from Memory

    Harold, Jan 26, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    9
    Views:
    367
  3. Guest

    Can't unload a form

    Guest, Nov 29, 2005, in forum: Microsoft Access VBA Modules
    Replies:
    3
    Views:
    1,258
    Allen Browne
    Nov 29, 2005
  4. Guest

    On Close vs. On Unload

    Guest, Apr 11, 2006, in forum: Microsoft Access VBA Modules
    Replies:
    5
    Views:
    2,531
    Guest
    Apr 13, 2006
  5. Guest

    can't unload a form

    Guest, Aug 2, 2006, in forum: Microsoft Access VBA Modules
    Replies:
    4
    Views:
    1,153
    Guest
    Aug 3, 2006
Loading...

Share This Page