Name
control
.Picture [= setting
]
Synopsis
Sets or returns the picture loaded in the control. The picture can be set at design time in the Properties window or at runtime using the LoadPicture
function. The following code displays a picture using the image control:
Private Sub UserForm_Initialize( ) Image1.Picture = LoadPicture(ThisWorkbook.Path & "\turtle.jpg") Image1.PictureSizeMode = fmPictureSizeModeZoom End Sub
Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.