PDA

View Full Version : Button Image



cosmarchy
07-12-2012, 01:38 PM
Hello all,

I am having trouble finding out how to put an image on a button. So far I have created the button thusly:

Dim ctrl As Button
Set ctrl = Sh.Buttons.Add(20, 20, 20,20)
ctrl.OnAction = "help"


but cannot find out how to put an image on it instead of text. :banghead:

Does anyone know how to do this?

Thanks

CodeNinja
07-12-2012, 01:46 PM
If you are talking about putting an image on a command button, you can simply go into the properties and scroll down to picture then click the little ... and browse your hard drive and load an image.

Kenneth Hobs
07-12-2012, 02:18 PM
Insert a Picture instead.

cosmarchy
07-12-2012, 11:05 PM
If you are talking about putting an image on a command button, you can simply go into the properties and scroll down to picture then click the little ... and browse your hard drive and load an image.

Thanks for this but I should have said I'm trying to programatically change the image!!

CodeNinja
07-13-2012, 06:48 AM
Cosmarchy,
OH!!!! you want to load it with vba... ok... you want:

Commandbutton.picture = loadpicture(path)