PDA

View Full Version : Picture in Worbook or in Userform



oleneazer
12-20-2005, 02:18 PM
Hello

Here's my little problem

I know how to do this

CommandButton1.Picture=LoadPicture(iPath & "test.bmp")
'iPath -> Public Const iPath="C:\test\"

But how to put the picture in a worksheet or in a userform and then
what is the right VBA syntax to see the picture

CommandButton1.Picture=????

I haven't find the answer so if somebody has the answer.
Thanks

austenr
12-20-2005, 02:59 PM
Have a look at this link.

www.exceltip.com/st/Insert_pictures_ using_VBA_in_Microsoft_Excel/486.html

Shazam
12-20-2005, 07:19 PM
If you like you could use this example.

oleneazer
12-21-2005, 09:50 AM
Thanks for your help

But I don't want to use LoadPicture

I want to save a workbook with pictures in worksheet.
(The pictures are not saved in a directory, they are in the workbook)

So if I had a commandbutton in a worksheet or in a userform

What is the syntax to have the picture on the commandbutton
ex: Image1 is in Sheets(1).[A1]
so CommandButton1.Picture= Image1 doesn't work
I hope my question is clear

Thanks again

Finally I find a solution

Have a look in the attachment file
If somebody has another solution...