Access.2007.VBA.Bibl..

(John Hannent) #1
If you leave the “Always use the selected program to open this kind of file” checkbox checked
when opening the script file, then double-clicking a VBS file will open MSE, and you will need to
select “Microsoft (r) Windows Based Script Host” from the Open With menu to run the script; leav-
ing this checkbox unchecked means that double-clicking the VBS script file will run the script, and
you can select the MSE to edit the script from the Open With menu. I generally leave it unchecked,
to make it easier to run scripts.

If you want to run scripts by double-clicking them, select “Microsoft (r) Windows Based
Script Host” as the program to use when opening VBS files, and check the “Always use
the selected program to open this kind of file” checkbox.

Figure 17.7 shows the new MSE entry on the Open With menu of a VBS file.

FIGURE 17.7
The Microsoft Script Editor selection on a VBS file’s Open With menu.

If you have Visual Studio 2005 installed, you will see that program on the Open With
menu, and you can open a script in Visual Studio; however, the Visual Studio editor (for
VBScripts) is basically just a text editor with some color-coding, so I recommend using the MSE instead.

The MSE window (shown in Figure 17.8) has some similarities to the Visual Basic module window
for an Access (or another Office program), and to the VB 6 editor.

NOTENOTE


TIPTIP


Part III Adding More Functionality to Office

Free download pdf