View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default How does one create a delete property of a user defined class?

Create a method in your class called (eg) "Clear" which clears the cell and deletes the picture.
After calling that just set the class instance to Nothing.

Or put some code in the class_terminate event, which should get called when you set an instance to Nothing (but I'm not absolutely
sure about scope etc in this case, so you should test that thoroughly)


--
Tim Williams
Palo Alto, CA


wrote in message oups.com...
I have a class that I made, called clsPicCell. Each clsPicCell object
has a two objects within it, a range object and a picture object (both
private objects).

I would like help on how to be able to delete a clsPicCell object, call
it xCell. The desired result is that if I code something like:

xCell.delete

it will clear the range object and delete the picture, and get rid of
the object all together. How would I do this? I was unable to find any
related topics, so point me in the direction of one if you know of it.

Thanks,

-Abe