Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem - Deleting a Picture from a Cell
You are starting with an incorrect perception. Pictures are on a different
layer than cells. They may sit over a cell, but they are not in the cell. You would need to loop and find the picture Sub DeletePicture() Dim pic As OLEObject For Each pic In ActiveSheet.Pictures If pic.TopLeftCell.Address = _ Cells(10, 1).Address Then pic.Delete End If Next End Sub -- Regards, Tom Ogilvy general zod wrote in message ... I have inserted a small picture (jpg) into cell (a1) and I have used the following excel 97 VBA code to copy that picture into cell a10 Cells(1, 1).Select Cells(1, 1).CopyPicture Cells(10, 1).PasteSpecial Does anyone know the VBA code to then delete the picture from cell (10,1) A10 ???? Cells(10,1).delete just deletes the cell , it leaves the picture there ? . |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem - Deleting a Picture from a Cell
I stand corrected !! , thankyou very much - appreciated
On Sun, 20 Jul 2003 13:37:55 -0400, "Tom Ogilvy" wrote: You are starting with an incorrect perception. Pictures are on a different layer than cells. They may sit over a cell, but they are not in the cell. You would need to loop and find the picture Sub DeletePicture() Dim pic As OLEObject For Each pic In ActiveSheet.Pictures If pic.TopLeftCell.Address = _ Cells(10, 1).Address Then pic.Delete End If Next End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Picture problem | Excel Discussion (Misc queries) | |||
Inserting a Picture using Cell as picture name. | Links and Linking in Excel | |||
how do I insert picture into cell so vlookup can return picture? | Excel Worksheet Functions | |||
Deleting cell data without deleting formula | Excel Discussion (Misc queries) | |||
how prevent formula in cell from deleting when deleting value???? | New Users to Excel |