Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to find a way to have a macro run when a picture on
a worksheet is deleted. The pictures are loaded into the worksheet using a macro - when the picture is loaded descriptive text in a cell is added to the worksheet that corresponds to the picture. If a picture is loaded accidentally the user has the option of clicking on the picture and hitting the delete key - the problem is the corresponding text remains. How can I get a macro to run each time a picture is deleted that will delete the picture description??? I have searched past threads but can't seem to get something that is similar. David |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Another option I was considering was to somehow link the
range value with the picture when it is loaded so that if the picture is deleted the range is also deleted but I'm not sure if this is possible. David -----Original Message----- I need to find a way to have a macro run when a picture on a worksheet is deleted. The pictures are loaded into the worksheet using a macro - when the picture is loaded descriptive text in a cell is added to the worksheet that corresponds to the picture. If a picture is loaded accidentally the user has the option of clicking on the picture and hitting the delete key - the problem is the corresponding text remains. How can I get a macro to run each time a picture is deleted that will delete the picture description??? I have searched past threads but can't seem to get something that is similar. David . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi David,
You could use OnKey to reassign the Delete key to a macro something like this, Sub MyDeleteKey() If TypeName(Selection) = "Picture" Then 'Special Delete Else Selection.Delete End If End Sub Beware this is just air-code, and you'll need to do better than just Selection.Delete. Not all types of selections will have a delete method. Regards, Vic Eldridge "David Cuthill" wrote in message ... I need to find a way to have a macro run when a picture on a worksheet is deleted. The pictures are loaded into the worksheet using a macro - when the picture is loaded descriptive text in a cell is added to the worksheet that corresponds to the picture. If a picture is loaded accidentally the user has the option of clicking on the picture and hitting the delete key - the problem is the corresponding text remains. How can I get a macro to run each time a picture is deleted that will delete the picture description??? I have searched past threads but can't seem to get something that is similar. David |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trigger Macro by Worksheet_Change | Excel Discussion (Misc queries) | |||
Using date as trigger for macro | Excel Discussion (Misc queries) | |||
macro trigger | Excel Discussion (Misc queries) | |||
how to trigger macro or force autofit | Excel Programming | |||
EXCEL: trigger web query from macro? | Excel Programming |