O'Reilly logo

Mastering VBA for Microsoft Office 2016 by Richard Mansfield

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 18Building Well-Behaved Code

This chapter concentrates on the principles of good code behavior. Once you've built a macro that's useful and that works consistently as intended, you'll probably want to distribute it to some friends and coworkers, or even to a wider audience on the Internet.

Before you distribute it, though, you should make sure the procedure behaves in a civilized manner. It should be sensitive in its interaction with users and with the settings they may have chosen on their computers. It's all too easy to distribute an apparently solid, useful procedure that nevertheless runs roughshod over a user's preferences or that fails unexpectedly under certain circumstances. In this chapter, you'll look at how to avoid such ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required