April 2006
Beginner
1114 pages
98h 16m
English
control.Picture [= setting]
Sets or returns the picture loaded as the face of the command button. The picture can be set at design time in the Properties window or at runtime using the LoadPicture function. The following code displays a button with a picture on it:
Private Sub UserForm_Initialize( )
CommandButton1.Picture = LoadPicture(ThisWorkbook.Path & "\logo.jpg")
CommandButton1.PicturePosition = fmPicturePositionCenter
CommandButton1.Caption = "Wombat"
CommandButton1.Font.Bold = True
End SubRead now
Unlock full access