Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Trigger macro to run when picture is deleted

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Trigger macro to run when picture is deleted

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Trigger macro to run when picture is deleted

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trigger Macro by Worksheet_Change JSnow Excel Discussion (Misc queries) 5 October 2nd 08 06:27 PM
Using date as trigger for macro Mike Milmoe Excel Discussion (Misc queries) 3 May 10th 07 06:43 PM
macro trigger Leslieac Excel Discussion (Misc queries) 3 February 2nd 06 09:08 PM
how to trigger macro or force autofit lcoreyl Excel Programming 3 October 28th 03 04:27 PM
EXCEL: trigger web query from macro? Krick Excel Programming 0 August 5th 03 09:12 PM


All times are GMT +1. The time now is 04:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"