Contents Worksheets SheetRangeAValue Msg Box Contents End

Figure 4-1:

This message box displays a Range object's Value property.

Figure 4-1:

This message box displays a Range object's Value property.

MsgBox is a useful function; you often use it to display results while Excel executes your VBA code. I tell you more about this function in Chapter 15. The code in the preceding example displays the current setting of a cell's Value property. What if you want to change the setting for that property? The following macro changes the value displayed in cell A1 by changing the cell's Value property:

0 0

Post a comment