Inserting pictures into cells

S

Sharon

We are trying to insert pictures into cells that can be deleted when you
delete the row.
 
L

Lynxbci3

Insert a picture as normal

Right click and go into format picture

choose properties, and check move and size with cells

then when you move, resize or delete cell/row the pciture will b
delete
 
R

Ron de Bruin

This will not delete the picture
Use F5 objects after you do the delete to see that it is still there
 
D

Dave Peterson

Maybe you could provide the user a macro that deletes the pictures that have
their topleftcell in the selected range's rows.

Option Explicit
Sub testme()
Dim myRng As Range
Dim myPict As Picture

Set myRng = Selection

For Each myPict In ActiveSheet.Pictures
If Intersect(myPict.TopLeftCell, myRng.EntireRow) Is Nothing Then
'do nothing
Else
myPict.Delete
End If
Next myPict

myRng.EntireRow.Delete

End Sub

The pictures have .bottomrightcell, too. So you could check that instead (or
even check both corners).
 
Top