The main printing procedure is shown in Example 21-9. Note that we have been careful to deal with two special cases. First, there may not be any embedded charts in the workbook. Second, the user may hit the Print button without selecting any charts in the list box.
It is important to note also that list boxes are 0-based, meaning that the first item is item 0. However, our arrays are 1-based (the first item is item 1), so we must take this into account when we move from a selection to an array member; to wit, selection i corresponds to array index i+1.
Was this article helpful?