Suppose you have a spreadsheet with a series of numbers and formulas: Suppose you want to turn
Question:
Suppose you have a spreadsheet with a series of numbers and formulas:
Suppose you want to turn this into:
Write a subroutine that does this. Your subroutine should:
• Put in a set of parentheses and multiply the cell contents by 100.
• Move down one cell (see ActiveCellDemo1 , section 39.1).
• Ask if you want to repeat the process (if “yes,” it should do it; if “no,” the subroutine should exit).
The parentheses have to come after the " = ." The Right function might be used for this operation.
You may want to refer to section 39.2 for more information on the MsgBox function and the values it returns.
Section 39.2:
Objects are the basic building blocks of VBA. Although you may not be aware that you are using objects, most things you do in VBA require the manipulation of objects. We can think of an object as a sort of a container with variables, functions, and subroutines inside. All of Excel’ s components (workbooks, worksheets, ranges, etc.) are represented by an object in the VBA Object Hierarchy. The object’ s data are held in special variables called properties that can be accessed using the Dot (.) operator. One of the most important object types in VBA is the Range Object . A worksheet cell and a range of cells are all objects of the type Range . The following subsection introduces some predefined Range Object variables.
Step by Step Answer: