Capabilities of the Immediate Window

Using the Immediate window you can perform three primary tasks. First, you can use it to display useful output during the development process. Second, it can inspect the state of objects and variables while your code is in Break mode. Third, you can use the immediate code to execute statements. I'll be covering the first two tasks in Chapter 4. For now you'll just see how to use the Immediate window to execute statements.

If the Immediate window is not already visible, you can display it by selecting View ^ Immediate Window. To execute statements, type a question mark (?) followed by the statement you wish to execute and press Enter.

Immediate

R

? this workbook.Name

Boofc2

?2*3

6

? select ion. sdcJre3s

SASl

?now

7/22/2003 7:40:58 AH

?year (now)

2003 ill

As you can see, you can do everything from evaluating math statements to calling functions and exploring object properties. As you'll see later, this feature is particularly useful for experimenting with functions.

TIP When the Immediate window gets rather cluttered with output and you're ready to start fresh again, place the cursor in the Immediate Window, press CTRL+A, and then press the Delete key to quickly clear the window.

0 0

Post a comment