VBA run-time error 1004 How to troubleshoot

Source: Internet
Author: User
Tags object model

VBA run-time error 1004 how to troubleshoot

In the Excel software, some users use VBA, in some tests, occasionally encounter software error prompts, such as Error 1004. This is usually the result of an error that VBA runs, so how does the VBA runtime error 1004 solve it? The next small series tells you what to do with VBA Run-time error 1004.

This code tests the current VBA version:

Copy Code

The code is as follows:

Sub get VBA version ()

MsgBox Application.VBE.Version

End Sub

When you press the F5 key, report: Run-time error 1004. By the teacher's advice, click on the file?? Options?? Trust Center?? Open the Trust Center dialog box, macro settings?? Check "Trust access to the VBA project object Model". Run again, there will be no run-time error 1004 prompt.

Microsoft officials later saw the news.

Then in search engine query, just know run-time error 1004 not only in the above situation will be prompted. For example, you may also receive run-time error 1004 hint messages when you create an array formula for an application's macros by using Visual Basic. Causes an Excel VBA input formula to run with Run-time error 1004: This problem occurs when you try to pass a formula that contains more than 255 characters, and uses the Formulaarray property for Visual Basic in your application.

It seems that only one run-time error 1004 hint Code also has a lot of research, depending on the specific environment and different.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.