Image control

An Image control displays an image. You may want to use an Image control to display your company's logo in a dialog box. Figure 17-8 shows a dialog box with an Image control that displays a photo of some guy who writes Excel books.

Figure 17-8:

An Image control displays a photo.

Figure 17-8:

An Image control displays a photo.

The following list describes the most useful Image control properties:

^ Picture: The graphics image that is displayed.

^ PictureSizeMode: How the picture is displayed if the control size does not match the image size.

When you click the Picture property, you are prompted for a filename. However, the graphics image is stored in the workbook. That way, if you distribute your workbook to someone else, you don't have to include a copy of the graphics file.

Excel's clipart collection is a great source of images. Use InsertOIllustrationsO Clipart, and choose an image to place in your worksheet. Select the image, and press Ctrl+C to copy it to the clipboard. Then activate your UserForm, click the Image control and select the Picture property in the Properties box. Press Ctrl+V to paste the copied image. You can then delete the clipart image in the worksheet.

Some graphics images are very large and can make your workbook size increase dramatically. For best results, use an image that's as small as possible.

0 -1

Post a comment