Hi,
I try below code for destory object like excel application object, workbook, work sheet and adodb.
Public Sub gSetNothing(ParamArray objName() As Variant)
Dim i As Integer
For i = LBound(objName) To UBound(objName)
If IsObject(objName(i)) = True Then
If objName(i) Is Nothing = False Then
Set objName(i) = Nothing
End If
End If
Next
End Sub
it set object as nothing but object is not destory.
Please give me suggestion.
Thanks.
I try below code for destory object like excel application object, workbook, work sheet and adodb.
Public Sub gSetNothing(ParamArray objName() As Variant)
Dim i As Integer
For i = LBound(objName) To UBound(objName)
If IsObject(objName(i)) = True Then
If objName(i) Is Nothing = False Then
Set objName(i) = Nothing
End If
End If
Next
End Sub
it set object as nothing but object is not destory.
Please give me suggestion.
Thanks.