View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Urgent - Pl help code for assigning a shape to cells

Hi Sarah

This will add a jpg file on top of C1

Sub test()
Dim Pict As Picture
With ActiveSheet.Range("c1")
Set Pict = .Parent.Pictures.Insert("C:\ron.jpg")
Pict.Top = .Top
Pict.Width = .Width
Pict.Height = .Height
Pict.Left = .Left
Pict.Placement = xlMoveAndSize
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Sarah" wrote in message ...
Hi Mates

Could some one please tell me how I could assign a shape
(or even a jpeg image) to a particular cell using a code.
And also how to make it appear at the center of the cell.

Thanks in advance

sarah