I've got the code below and i want to release memory from objCommand (set objcommand = nothing), but where can I do this? If I do it inside the "If .. Then .. End If" then it wont be executed if the if-sentence is false and I can't do it after the if-sentence because I have to make a new command inside the if-sentence. I know it's not a big problem, but I want it to be made correctly.
Code:
Set objCommand = New ADODB.Command
With objCommand
.ActiveConnection = objConnection
.Execute
End With
If objCommand.Parameters(0).Value = "T" Then
End If