View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default LoadPicture for a ControlButton help

turn on the macro recorder while you do

Insert=Picture from File

I get
ActiveSheet.Pictures.Insert( _
"C:\Documents and Settings\OgilvyTW\My Documents\My
Pictures\Part1.jpg").Select

so to use that, some modifications:

Dim Pic as Picture
Dim sName as String
sName = "C:\Myfiles\MyPictures\House.jpg"
set pic = Activesheet.Pictures.Insert(sName)
Pic.Name = "doghouse"

--
Regards,
Tom Ogilvy

"micmacuk" wrote:


Thanks Tom it works...
How can I give a "name" to the "shape" picture.

I have paste my icon pic. on my data sheet and I have used the macro
recorder to get the name of the pic. and was surprise to see the name
("Picture 4") although it is the only pic on this sheet.

Also is there a way to copy the pic frpm the disk and paste it onto my
data sheet (and then give it a name...) ?


--
micmacuk
------------------------------------------------------------------------
micmacuk's Profile: http://www.excelforum.com/member.php...o&userid=33253
View this thread: http://www.excelforum.com/showthread...hreadid=546771