Microsoft Office Tutorials and References
In Depth Information
Using an External Control
In the Additional Controls dialog box, scroll down and place a check mark next to
Windows Media Player.
Click OK.
Your Toolbox will display a new control.
Figure 14-19 shows the Windows Media Player control in a UserForm, along with the
Property window. The URL property represents the media item being played (music or video). If
the item is on your hard drive, the URL property will contain the full path along with the filename.
Figure 14-19: The Date and Time Picker control in a UserForm.
Figure 14-20 shows this control being used. I reduced the height of the Windows Media
Player control to hide the video display. I added a ListBox, which is filled with MP3 audio
filenames. Clicking the Play button plays the selected file. Clicking the Close button stops the sound
and closes the UserForm. This UserForm is displayed modeless, so the user can continue working
when the dialog box is displayed.
This example is available on the companion CD-ROM. The file is named mediaplayer.
xlsm , and it’s in a separate directory that includes some public domain MP3 sound
effect files.
Search JabSto ::

Custom Search