UrbanPro

Learn MS Access from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Can MS Access run all VBA code written in Excel?

Asked by Last Modified  

Follow 2
Answer

Please enter your answer

While Microsoft Access and Microsoft Excel both support VBA (Visual Basic for Applications), there are some differences between the two environments. In general, many VBA code constructs and functions written for Excel can be used in Access, but there are certain considerations and limitations due...
read more

While Microsoft Access and Microsoft Excel both support VBA (Visual Basic for Applications), there are some differences between the two environments. In general, many VBA code constructs and functions written for Excel can be used in Access, but there are certain considerations and limitations due to the differences in the object models and features of the two applications.

Here are some key points to keep in mind:

  1. Common VBA Constructs:

    • Basic VBA constructs, such as loops, conditionals, and variable declarations, are generally compatible between Excel and Access.
  2. Excel-Specific Objects and Features:

    • Some VBA code written for Excel may involve objects or features that are specific to Excel, such as worksheets, ranges, or Excel-specific functions. These elements may need to be adapted or replaced when running the code in Access.
  3. Access-Specific Objects and Features:

    • Similarly, Access has its own set of objects and features that may not exist in Excel. These include forms, reports, and database-specific functionality. When running VBA code in Access, you may need to leverage Access-specific objects and adapt code accordingly.
  4. References and Libraries:

    • Excel and Access may have different references and libraries available. If your VBA code relies on external references or libraries specific to Excel, you may need to adjust those references when working in Access.
  5. User Interface Elements:

    • The user interface elements and events in Excel (such as worksheets and cells) are different from those in Access (such as forms and controls). Code related to user interface interactions may need adjustments.
  6. Error Handling:

    • Error handling mechanisms may need to be adapted since the types of errors encountered in Excel may differ from those in Access.
  7. Security Considerations:

    • Access and Excel have different security models. Certain actions that are allowed or restricted in one application may have different implications in the other. This is particularly relevant for file and data access.
  8. Database Connectivity:

    • Access may involve interactions with databases, and VBA code in Access may include database-specific operations that are not applicable in Excel.

In summary, while many VBA constructs are transferable between Excel and Access, it's crucial to review and modify code to account for the differences in object models, features, and functionality between the two applications. Understanding the specific requirements of each application and adjusting the code accordingly will help ensure compatibility and proper execution of VBA code in Access.

 
 
 
read less
Comments

C language Faculty (online Classes )

Can MS Access run all VBA code written in Excel? No it can't but it's usually easy to migrate functions from one to the other. The main problems are if your excel code is doing lots of things with, well, with Excel itself. The Excel and Access object models are different.
Comments

Related Lessons

Type Error In VBA
VBA Error Types: There are three types of VBA error that you may encounter when executing an Excel macro. These are: Compile Errors/Syntax errors: Compile Errors are recognized by the VBA compiler as...

What Is Phython?
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. It was created by GuidovanRossum during 1985- 1990. Like Perl, Python source code is also available...

SQL Join Types
There are four basic types of SQL joins: inner, left, right, and full. The easiest and most intuitive way to explain the difference between these four types is by using a Venn diagram, which shows all...

What is Hyperion?
- Its an Business Intelligence tools. Like Brio which was an independent product bought over my Hyperion has converted this product name to Hyperion Intelligence. Is it an OLAP tool? - Yes. You can analyse...

MS Access - DAO (Data Access Object)
DAO is a well-known, easy to use object model for database services, including Microsoft Jet, ODBC, and in the future, OLE DB. DAO is also multi-lingual-you can use it from VB and VBA environments, FoxPro,...

Recommended Articles

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Applications engineering is a hot trend in the current IT market.  An applications engineer is responsible for designing and application of technology products relating to various aspects of computing. To accomplish this, he/she has to work collaboratively with the company’s manufacturing, marketing, sales, and customer...

Read full article >

Information technology consultancy or Information technology consulting is a specialized field in which one can set their focus on providing advisory services to business firms on finding ways to use innovations in information technology to further their business and meet the objectives of the business. Not only does...

Read full article >

Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...

Read full article >

Looking for MS Access Training?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for MS Access Classes?

The best tutors for MS Access Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn MS Access with the Best Tutors

The best Tutors for MS Access Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more