By now, you’ve probably noticed that the first thing I do when I want to try out a new feature in Visual Basic is to create a minimal program that can be easily modified to try out the new feature. That’s exactly how the program shown in Figure 13.1 was built.
Figure 13.1: The MSScript Demo program
This program isn’t pretty, but it allows you to test most of the major features of the ScriptControl. You can enter an expression, statement, or program into the large text window, and click on the Eval, ExecStmt, AddCode, or Run button to process your code. The Run button requires that you enter the name of the subroutine that you want to run in the small text box below the buttons.
The other buttons work as follows: