Share via


Security Considerations

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

While security might not be the most exciting topic, the fact is security is taking on an ever-greater importance for programmers as computers become increasingly connected through corporate networks and the Internet. Be sure to discuss the security requirements for your application with your customers.

As a Microsoft® Office XP application developer, you should concern yourself with two aspects of security. The first is protecting your intellectual property by securing your code. The second is protecting your application from viruses and unwelcome users.

To secure your intellectual property, you have the following options:

  • You can password-protect the VBA project.

  • If your application involves creating an add-in, you can build a COM add-in, which is compiled into a .dll file. The code contained in the .dll file cannot be viewed, so you can distribute the file without worrying about others stealing your code.

  • If you are building an application in Microsoft® Access, you can create an .mde file from the database and distribute that file. Saving your database as an .mde file removes all editable source code and prevents users from viewing or modifying the design of forms, reports, data access pages, or modules. Your VBA code will continue to run, but it cannot be viewed or edited. If your application is an Access project (.adp) rather than an Access database, you can create an .ade file, which is similar to an .mde file.

    Note   Although saving a database as an .mde or .ade file prevents users from modifying a data access page from within Access, if they have access to the HTML file, they can still modify the HTML file in another HTML editor. To prevent users from modifying a data access page, you should save the HTML file to a network share and specify read-only permissions for users who must view the data access page but who should not be able to modify it.

To protect your application from viruses and from undesired users, you have the following options:

  • You can install a VBA virus scanner.
  • You can define trusted sources for code. A trusted source is an individual or company that has been certified by a certification authority. Then, you can set the security level for each Office XP application to High to run code only from trusted sources, to Medium to permit users to choose whether to run potentially unsafe code, or to Low to run all code, whether trusted or not.
  • You can use Microsoft® Jet security to secure a Microsoft Jet database (.mdb). Microsoft Jet makes it possible for you to implement user-level security for each object in a database.

See Also

Security | Designing Applications | The Design Process | Which Technologies Should You Use? | Thinking About User Interface Design | Designing Code for Reusability | Testing Your Application | Application Deployment