+ Reply to Thread
Results 1 to 17 of 17

User Form Facing Compile Error and Automation Error

  1. #1
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    User Form Facing Compile Error and Automation Error

    Dear Forum,

    Hope your expertise will help me for the following issues:

    I have developed a user form based data entry tool and shared with my team for data entry. They are facing the following errors when they are opening, But i do not have any issue its works perfectly for me.

    1. Compile Error: Can not find project or library

    2. Automation Error: Run-time Error '-2146232576 (80131700)' Automation Error

    I am using Microsoft Standard 2013 office product.

    Could you please guide me for this issue? I am running out of my assignment and it should be implement before this end of the day.

    Thanks in advance
    Last edited by bala04msw; 06-01-2018 at 02:28 AM.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: User Form Facing Compile Error and Automation Error

    Hi,
    It sounds as though you have a missing reference. What references do you have selected for the project, and are your team running the same version of Office and Windows as you are?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: User Form Facing Compile Error and Automation Error

    Dear xlnitwit,

    Thanks for your mail. Since i am in a learning phase, i am not able to identify what i have selected as reference for this project. But after searching from web, i went to tool icon and select reference and remove "Microsoft Office Common Control 2.0 SPA" and then now its working for few of them. But the rest of the person, they are facing the automation error.

    No, some of them they are using Microsoft Professional 2013 and 2016 also. How can i fix this issue? Please guide me.

    Regards

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: User Form Facing Compile Error and Automation Error

    You have not given enough information to determine the problem, as we can't see your workbook or even the code in question, and you haven't said which code causes the error.

  5. #5
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: User Form Facing Compile Error and Automation Error

    Dear Mr. Xlnitwit,

    I am extremely sorry for the delay response. Debug shows "SVForm.Show"

    Regards

    Please Login or Register  to view this content.

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: User Form Facing Compile Error and Automation Error

    When the error occurs, choose Debug, then keep pressing f8 until the error occurs again. Which line is highlighted?

  7. #7
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: User Form Facing Compile Error and Automation Error

    Dear sir,

    The yellow color highlighted on "SVForm.Show" code, which i have given in "This Workbook"

    Regards

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: User Form Facing Compile Error and Automation Error

    I know. What happens when you press f8 after that line is highlighted following the original error?

  9. #9
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: User Form Facing Compile Error and Automation Error

    Dear Mr. Xlnitwit,

    If i click debug first time, it will highlight "SVForm.Show" and if i keep on pressing F8, the yellow color highlighted line moving to the below given code. Even after if i press F8, the yellow color highlighted line moving only between "Me.cbfacilityname.AddItem ws.Cells(i, "B").Value and next i".

    Please Login or Register  to view this content.

    Kindly do the needful.

  10. #10
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: User Form Facing Compile Error and Automation Error

    Press f5 instead of f8 and then tell me which line is highlighted.

  11. #11
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: User Form Facing Compile Error and Automation Error

    Sir,

    If i press F5, again the message box shows, "Run-time Error '-2146232576 (80131700)' Automation Error" and i click debug, it will highlight "SVForm.Show" only. even after keep on pressing F5, yellow color highlights on "SVForm.Show" only.

    Regards

  12. #12
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: User Form Facing Compile Error and Automation Error

    Open the VB editor. Click Tools- Options, then select the General tab and check the 'Break in class module' option under 'Error Trapping'. Then run the code again and tell me which line is causing the error.

  13. #13
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: User Form Facing Compile Error and Automation Error

    Sir,

    I just followed your guidance and instruction and found the error. I have enclosed the screenshot of that.

    Regards
    Attached Images Attached Images

  14. #14
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: User Form Facing Compile Error and Automation Error

    Perhaps you don't have the relevant .Net framework installed. You might use a sorting algorithm (e.g. QuickSort) instead of a call to the ArrayList.

  15. #15
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: User Form Facing Compile Error and Automation Error

    Sir,

    How could i fix this issue? please guide me.. Really breaking my head...

    Regards

  16. #16
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: User Form Facing Compile Error and Automation Error

    If you want the code to work as it is, installing the .Net framework should be enough.

  17. #17
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: User Form Facing Compile Error and Automation Error

    Dear sir,

    Thanks for your patience and guiding me. I found other way to fix this issue. I downloaded Microsoft .NET Framework 2.0 SP2 (which automatically also installed 3.5) at the same time, and the following code now works.

    Regards

+ 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. Access 2007 Compile error in User login form VBA
    By lengwer in forum Access Tables & Databases
    Replies: 1
    Last Post: 06-15-2016, 12:20 PM
  2. Facing 'run-time error -2147217871 (80040e31) Automation error' in excel VBA
    By junaidanjum in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2013, 03:48 AM
  3. User form compile error - Need urgent help
    By Avinash1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-14-2013, 09:04 AM
  4. compile error - Using text box to display date in an user form
    By sivdin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2013, 04:02 AM
  5. File Not Found error when opening User Form - need help tracing root of error
    By VBA FTW in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-25-2013, 03:48 PM
  6. [SOLVED] Compile error automation error
    By nikkiws in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-17-2006, 04:30 AM
  7. [SOLVED] compile error automation error
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-17-2006, 04:10 AM

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