Set objectName = Nothing
Note: At the end of script we need to write above statament.
Exmple:
'Create a new Microsoft Excel object
Set myxl = createobject("excel.application")
'To make Excel visible
myxl.Application.Visible = true
myxl.Workbooks.Add
wait 2
'Save the Excel file as qtp.xls
myxl.ActiveWorkbook.SaveAs "D:\qtp.xls"
'close Excel
myxl.Application.Quit
Set myxl=nothing