Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That helps Jim. Thanks!
-Abe Jim Thomlinson wrote: It is the same general idea as instantiating a word object. Setting the instance to nothing does not close the application. Unless told to close it does not close. Same idea here. You did not tell the range object to clear. You just removed your pointer to that object. The range and the picture exist on their own. The destructor runs on the object when you set it to nothing. You have to do the housekeeping in the destructor (terminate) before loosing your link to the object. It is sort of analagous to the housekeeping that you have to do in C++ or Java when you destroy objects. In VB we are spoiled because usually VB does the housekeeping for us (except in the case of objects). -- HTH... Jim Thomlinson " wrote: Thanks Tim, creating the clear method worked... though im not sure why setting the object to nothing wouldn't delete the picture... -Abe Tim Williams wrote: 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cant delete user defined default chart type | Charts and Charting in Excel | |||
How do I delete a User defined default excel chart | Charts and Charting in Excel | |||
Delete user-defined charts | Charts and Charting in Excel | |||
User-defined type collection in class module | Excel Programming | |||
Create my own Class Object for Ranges, having trouble assigning name property | Excel Programming |