Article ID: 115859
Article Last Modified on 10/29/2003
Sub Command1_Click ()
Dim sheet As Object
Set sheet = CreateObject("Excel.Sheet.5")
' The following line causes the "Method not Applicable for
' This Object" error:
sheet.Parent.Close
Set sheet = Nothing
MsgBox "Excel Object created and destroyed successfully!"
End Sub
sheet.Parent.Close
sheet.Parent.[Close]Keywords: kberrmsg kbprogramming kbprb KB115859