+ Reply to Thread
Results 1 to 3 of 3

textbox automation error

  1. #1
    John Wilson
    Guest

    textbox automation error

    Why does this happen and how can I get around it??

    Brand new workbook (no data)
    Create a UserForm (UserForm1)
    Add a Textbox and a command button.

    The only code is in the TextBox AfterUpdate Event.

    Private Sub TextBox1_AfterUpdate()
    Unload Me
    End Sub

    Crashes with an "Automation Error"??

    I'm trying to use this scenario in a different workbook and need
    to close the present userform to open a second one but I can't
    even get the above to work in a new blank workbook.

    Any ideas??

    Thanks,
    John



  2. #2
    Tom Ogilvy
    Guest

    Re: textbox automation error

    Put it in the exit event.

    --
    Regards,
    Tom Ogilvy

    "John Wilson" <jwilson@optonline.net> wrote in message
    news:erwJisjAFHA.2792@TK2MSFTNGP15.phx.gbl...
    > Why does this happen and how can I get around it??
    >
    > Brand new workbook (no data)
    > Create a UserForm (UserForm1)
    > Add a Textbox and a command button.
    >
    > The only code is in the TextBox AfterUpdate Event.
    >
    > Private Sub TextBox1_AfterUpdate()
    > Unload Me
    > End Sub
    >
    > Crashes with an "Automation Error"??
    >
    > I'm trying to use this scenario in a different workbook and need
    > to close the present userform to open a second one but I can't
    > even get the above to work in a new blank workbook.
    >
    > Any ideas??
    >
    > Thanks,
    > John
    >
    >




  3. #3
    John Wilson
    Guest

    Re: textbox automation error

    That worked Tom.

    Thanks,
    John

    "Tom Ogilvy" <twogilvy@msn.com> wrote in message
    news:%239AOQ0jAFHA.3744@TK2MSFTNGP15.phx.gbl...
    > Put it in the exit event.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "John Wilson" <jwilson@optonline.net> wrote in message
    > news:erwJisjAFHA.2792@TK2MSFTNGP15.phx.gbl...
    >> Why does this happen and how can I get around it??
    >>
    >> Brand new workbook (no data)
    >> Create a UserForm (UserForm1)
    >> Add a Textbox and a command button.
    >>
    >> The only code is in the TextBox AfterUpdate Event.
    >>
    >> Private Sub TextBox1_AfterUpdate()
    >> Unload Me
    >> End Sub
    >>
    >> Crashes with an "Automation Error"??
    >>
    >> I'm trying to use this scenario in a different workbook and need
    >> to close the present userform to open a second one but I can't
    >> even get the above to work in a new blank workbook.
    >>
    >> Any ideas??
    >>
    >> Thanks,
    >> John
    >>
    >>

    >
    >




+ 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