Example 3: To display a picture in the command button, on activation of UserForm:
Private Sub UserForm_Initialize()
CommandButton1.Picture = LoadPicture("C:\Project_1\NewPictures\TestImage1.jpg")
End Sub
Example 4: To display picture in the Image control on clicking the command button:
Private Sub CommandButton1_Click()
'clicking the command button will display a picture in Image control:
With UserForm6
Image1.Picture = LoadPicture("C:\Project_1\NewPictures\TestImage1.jpg")
End With
End Sub