View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] Abraham.Olson@gmail.com is offline
external usenet poster
 
Posts: 28
Default Problem with inserting picture.

I want to be able to insert a picture in a variety of cells (each cell
is a range object in the object arrayofRanges). Can someone help me
with where I am going wrong? I have a feeling I dont get the whole set
for pictures right.

Sub TestPictureInsert()

'declarations
Dim picQCAnormal As Picture
Set picQCAnormal = _
Worksheet(2).Pictures.Insert("C:\oneCell_normal.bm p")
Dim pic As Picture

'Put a picture the size of each range in each range _
(each range is only one cell)

For each rnge in arrayofRanges
Set pic = picQCAnormal
With pic
.Top = rnge.Top
.Left = rnge.Width
.Width = rnge.Width
.Height = rnge.Height
End With
Next rnge

End Sub