Asked By
Domino Sy
10 points
N/A
Posted on - 10/22/2017
Hello, I am using visual basic for applications, and I continue getting a visual basic runtime error whenever I run a code. It shows runtime error 1004 access is not trusted. I don’t know what to do. Is my code faulty? Is there any solution for this runtime error? I am a Microsoft Excel 2007 user. Please help
How To Get Rid Of Visual Basic Runtime Error
Hi, yes there is a solution. Don’t worry; your code is not faulty, the Visual Basic runtime error is displaying because of the security issue. You are using Microsoft Excel 2007, it has a security feature which let you choose to access visual basic project, and your settings must be in default, that is why it is showing a runtime error.
Follow the steps to solve this runtime error-
• Press office button on the top and click excel options
• Now click on the trust center
• Now press trust center settings
• Now click on the macro settings
• There will be an option like Trust access to the VBA project object model, select it and press ok
• Now restart and rerun
• Great, now you are good to go