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 a famous Excel book author.

Image Control Excel Vba

The following list describes the most useful Image control properties: i Picture: The graphics image that is displayed.

i 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.

Here's an easy way to set the Picture property: Copy the image to the Clipboard, select the Image property in the Properties box, and press Ctrl+V to paste the copied image.

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 0

Post a comment