![]() |
#25
|
|||
|
|||
![]()
Sorry for the delay, but i kept thinking and thinking ...
![]() Point1: Post #35 I basically share your opinion about the application crash on the attempt to Mem_copy something what doesn't match a 4 Bytes Code. By accident I choose first a range-object (and experienced the crashes), afterwards I changed to a worksheet-object (avoiding crashes I didn't any mem-copy to an object or a variant). I was just looking at the numbers of ObjPtr which are always the same whether you obtain them directly from the object ObjPtr(Sheet1) or from the variable ObjPtr(objwks) Therefore I wondered, why did excel crash, because even with the variable gone I ask at the end of the Copy of ObjPtr(Range("A1")), and since the Range still exists and hasn't changed, what's the problem to copy it? It took me a long time to figure out there is a difference between Range and Worksheet: Whereas Worksheet keeps his pointer throughout the application, this isn't the case with Range. A Range changes its pointer, furthermore the variable (objRange) set to the Range is assigned another pointer. I said the choice was by accident but actually I'm glad about the choice because otherwise it would have led in a complete different direction... Point2: I regret the lack of knowlegde about the architecture of objects and what they look like in memory. I really do, probably it would make things a lot easier knowing about this things. Point3: Quote:
![]() But Yes, I agree, at least for the moment let's depend on the change. Point4: According to Point 4, I agree, memory is freed whether or not the variable is set to Nothing (at least valid for the macros I tried up to now). A surprise to me: Classes are destroyed without explicity destroying them. But I don't agree on this Quote:
Attached the file including 4 tests - as well the CircRef - with some kind of summary. |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Wierd "script code" in a downloaded .doc file | CNBarnes | Word | 2 | 10-18-2012 02:07 AM |
![]() |
krishnaoptif | Word VBA | 9 | 06-22-2012 05:08 AM |
![]() |
Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |
Rules and Alerts: "run a script"? | discountvc | Outlook | 0 | 06-15-2010 07:36 AM |
An "error has occurred in the script on this page" | decann | Outlook | 8 | 09-03-2009 08:54 AM |