Figure

A simple list for testing the End property

e2 Microsoft Office Excel 2003 Beta - Chapter 8 Examples.«!* 0® f^l

:EfQ Fie Edit View Insert Format locfs E>ata Window Help

1 A

55:4! - ."3 £ J

' -J ■' ¡2 ifcj (1

a1 -

A 1 B 1 C

d E i F "H

1

1 '1 l| 1

2

1j l| 1

3

A

5

5

__ .

7

8

1

9

10

11

12

1

13

1

14

1!

1

15

16

17

1 HI

Mi. kli/_LM Example |< >J 1

[ Rfcfldy

If the current cell is not empty, then see if the cell next to the current cell (in the direction specified by the arrow key) is empty. If the next cell is empty, then select the first nonempty cell. If a nonempty cell isn't found, select the cell next to the boundary of the worksheet. If the next cell is not empty, then select the last cell in the range of contiguous nonempty cells.

Listing 8.7 presents an example that uses the End property. I set this procedure up using the worksheet from the preceding exercise. You may need to update the procedure to refer to a different worksheet if you didn't use the first worksheet in the workbook.

0 0

Post a comment