After completing this chapter, you will be able to:

  • Create and use custom functions.

  • Handle errors that occur while a macro is running.

A bacteria cell doesn't have a nucleus. A cell without a nucleus is called a prokaryote. Prokaryotes are very important. The first known fossils, dating from three and a half billion years ago, are all prokaryotes. Prokaryotes are also very small. In 1999, Heide Schulz discovered the prokaryote species Thiomargarita namibiensis whose individual organisms grow to be as large as 3/4 millimeter-about the size of the head of a fruit-fly. This is astonishingly large for a bacteria but doesn't seem very large compared to, say, a puppy.

Probably the largest single-celled organism is Caulerpa taxifolia. It is a type of seaweed- algae, really-that has been an uncontrollable weed in the Mediterranean Sea since 1984 and was discovered off the coast near San Diego, California, in June 2000. A single Caulerpa plant-consisting of a single cell-can grow to just under a meter in length. In the grand scheme of things, a single-celled Caulerpa is not very big, but it is orders of magnitude larger than a single-celled Thiomargarita. The difference is due to structure. The Caulerpa has a nucleus. It has appendages and vacuoles and rhizomes. Structure enables functional size.

Recorded macros are like prokaryotes. The macro recorder puts everything you do into a single, unstructured procedure. And, like prokaryotes, single-procedure macros should be small. To get a large, sophisticated application to work properly, you must give it an internal structure-you must break it up into smaller procedures. And just as large, complex organisms need an immune system to deal with diseases, sophisticated applications need a mechanism for dealing with error conditions. In this chapter, you'll learn how to create custom functions, use arguments in procedures, and handle errors-tools you'll need to make more powerful applications.

 On the CD   This chapter uses the practice file  Function.xls that you installed from the book's CD-ROM. For details about installing the practice files, see 'Using the Book's CD-ROM' at the beginning of this book.

Microsoft Excel 2002 Visual Basic for Applications Step by Step
FrameMaker 6: Beyond the Basics
ISBN: 735613591
EAN: 2147483647
Year: 2005
Pages: 122
Authors: Lisa Jahred

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net