View Single Post
 
Old 06-20-2014, 06:36 AM
CoolBlue's Avatar
CoolBlue CoolBlue is offline Windows 7 64bit Office 2013
Advanced Beginner
 
Join Date: Jun 2014
Location: Australia
Posts: 40
CoolBlue is on a distinguished road
Default Slow "comparison/replace" script

Maybe this will do it for you...

Create a Custom Class
Code:
'Class2
Option Explicit

Public i As Long
Public j As Long
Public k As Long
Then add to the standard Module with other XXXIsGone code
Code:
Const clsBytes As Long = 32 * 4
'///////////////////////////////////




'///////////////////////////////////
Sub ExampleForClass()
Dim objCls As Class2
Dim str As String
     
    Set objCls = New Class2
    objCls.i = &HAAAAAA
    objCls.j = &HABABAB
    objCls.k = &HBCBCBC
    
    lng_ObjPtr = ObjPtr(objCls)
                     
    str = PionterToSomething("objCls", lng_ObjPtr, clsBytes)
    Debug.Print str

    'Set objCls = Nothing
End Sub
'///////////////////////////////////


'///////////////////////////////////
Sub classIsGone()
    Debug.Print
    ExampleForClass
    DoEvents
    printPionterToSomething "objCls", lng_ObjPtr, clsBytes
End Sub
And try with and without the set to nothing...
No difference.

Last edited by CoolBlue; 06-20-2014 at 02:57 PM.
Reply With Quote