View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Pictures in Cells in Excel?

Sub Tester2()
Dim pic As OLEObject
Dim rng As Range
Dim lBorder As Long
lBorder = 8
For Each pic In ActiveSheet.Pictures
Set rng = pic.TopLeftCell
pic.Top = rng.Top + lBorder
pic.Left = rng.Left + lBorder
pic.Width = rng.Width - 2 * lBorder
pic.Height = rng.Height - 2 * lBorder
Next

End Sub

--
Regards,
Tom Ogilvy



Joe 90 wrote in message
...
Any way to make a picture stick/bind to a cell in Excel.

The handheld auditing program we use exports the data, including photos to
excel fine, and places the picture over the cell intended, top and left. I
know how to resize it to the size of the cell, but want to make it a bit
smaller than the cell and centre it on the cell to give a small border of
white space around it. I can make it smaller than the cell, but its still
top and left aligned to the cell. the only alignment adjustments I can

find
work in relation to the sheet, and not to a cell?

Working in Excel 2000 (that's what my users have)

Thanks