+ Reply to Thread
Results 1 to 10 of 10

Code crashes automation error help

  1. #1
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Code crashes automation error help

    Hi guys,
    I'm only learning vba so maybe somebody can have a look at the code and give me some advice what can be wrong?
    this code was working fine, but suddenly it start crashing, basically what happens:
    When i press the "btnlookup" button excel crashes saying "automation error exception occurred".
    When i tryied to step into the code pressing F8 it keeps stopping at the line which i highlighted and goes back to the one i highlighted in green.

    I appreciate all help, thanks in advance

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code crashes automation error help

    Do you definitely have 125 textboxes named textbox1, textbox2, textbox3... textbox125?
    Last edited by Norie; 07-12-2014 at 11:32 AM.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: Code crashes automation error help

    Hi Norie,
    yes this is part of my userform, basically this is very big userform which will be used at work as a database.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code crashes automation error help

    Can you upload an example workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

  5. #5
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: Code crashes automation error help

    Norie,

    The file is 3.7mb and it is too large to upload, maybe there is another way how can i upload it to you?

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code crashes automation error help

    Can you create a cut down he version without minimum data?

    If you can't you could try zipping the file and uploading the zipped file.

  7. #7
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: Code crashes automation error help

    Norie,
    i have uploaded the zip file. Thanks for your help
    Attached Files Attached Files

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code crashes automation error help

    I've only just had a quick look at the workbook but I really don't think you should be using a userform for this, especially not a userform with so many controls.

    Couldn't you have a simple userform that's displayed when the user double clicks on a cell in a row and then allows them to enter data on that row?

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Code crashes automation error help

    Oh, forgot to mention - how can I replicate the problem you are having?

    Is there a particular button I need to press, perhaps some data I should enter etc...

  10. #10
    Forum Contributor
    Join Date
    08-08-2012
    Location
    englang
    MS-Off Ver
    Excel 2010
    Posts
    152

    Re: Code crashes automation error help

    After you open file open userform then enter 123456 into textbox "txtOrder" and then press black button "btnlookup".
    I noticed it works fine if after opening the file you will go to developers tab and enter visual basic and then close visual basic, but if you will go straight to userform and do everything what is mentioned above it will crash.

    Thanks Norie

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel Crashes or Gives "Automation Error" on Mac when running Macro
    By mlj61289 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2013, 04:39 PM
  2. Excel Crashes with Automation Error when calling a Userfom
    By jonathan@ibbotsons in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2013, 07:13 AM
  3. Automation error with userforms in my VBA code
    By Masact in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-26-2009, 11:07 AM
  4. Macro crashes "Automation error" during copy of workbook with char
    By Yorch in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-30-2006, 05:10 PM
  5. code Automation Error
    By Al in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-29-2005, 06:05 PM

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