Please Help with this Code. My program is crashing when Unloading
I'm using a class module (in the zip file) called ctooltip.cls
I have no other declarations, other than this function and the code inside the class module. My program terminates fine when the function below doesn't get called, but when I start the program with a commandline parameter the program crashes on termination every time. I figure that something isn't getting destroyed or set to = nothing etc...
Any help would be greatly appreciated.
VB Code:
Private Function AnalyzeCommandLineParameters(cmd As String) As Boolean
If CommandLineHelper is the name of the class, why not try to use an object variable instead of trying to directly manipulate the instance in the With statement? You could use a code like this:
VB Code:
Dim obj As CommandLineHelper
Set obj = New CommandLineHelper
With obj
'Your code here ...
'Your code here ...
End With
Set obj = Nothing
I think in the above code if you did miss the Set obj = Nothing, it wouldn't crash the program. But since you are trying to directly manipulate the new instance without assigning it to a variable, it might be crashing.
.
I am not a complete idiot. Some parts are still missing. Check out the rtf-help tutorial General VB Faq Thread Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink! Get more power for your floppy disks. ; View honeybee's Elite Club: Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
And if that response was mine, please think about giving me a rep. I like to collect them!
Without seeing the rest of the code... it's just a shot in the dark. You definitely should change any code that you had to the code format I changed it to. but other than that...?????