O'Reilly logo

Excel 2016 Power Programming with VBA by Richard Kusleika, Michael Alexander

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

7 VBA Programming Examples and Techniques

In This Chapter

  • Using VBA to work with ranges
  • Using VBA to work with workbooks and sheets
  • Creating custom functions for use in your VBA procedures and in worksheet formulas
  • Trying miscellaneous VBA tricks and techniques
  • Using Windows Application Programming Interface (API) functions

Learning by Example

Most beginning VBA programmers benefit from hands-on examples. A well-thought-out example usually communicates a concept much better than a description of the underlying theory. Therefore, instead of taking you through a painful review of every nuance of VBA, this chapter guides you through demonstrations of useful Excel programming techniques.

Here, you will walk through examples that solve practical problems while furthering your knowledge of VBA. This includes:

  • Working with ranges
  • Working with workbooks and sheets
  • VBA techniques
  • Functions that are useful in your VBA procedures
  • Functions that you can use in worksheet formulas
  • Windows API calls

Working with Ranges

The examples in this section demonstrate how to manipulate worksheet ranges with VBA.

Specifically, we provide examples of copying a range, moving a range, selecting a range, identifying types of information in a range, prompting ...

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