Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

An image on a command button?

Status
Not open for further replies.

thoughts

IS-IT--Management
Jul 26, 2007
2
IN
Is it possible to put an image on a command button?
 
At design time;
Go to the properties windows of the command button, look for Picture property and a dialog will ask for the location of your image.

During runtime
Just try the code below;
Code:
Private Sub UserForm_Initialize()
With Me.CommandButton1
    .Caption = ""
    .AutoSize = True
    .Picture = LoadPicture("e:\logo.gif")
    .PicturePosition = fmPicturePositionCenter
End With
End Sub

Is this what you are refering to?

Regards
E2C
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top