Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim WBkName As String
WBkName = Right(ActiveWorkbook.Name, 3)
If WBkName <> "xnv" Then 'or WBkName = "xls"
Call EnableCopyCutAndPaste
End If
End Sub
This code checks if the file extension in xls or xnv (these extensions generated by excel addin softwares) and calls EnableCopyCutAndPaste only if file extension is not xnv.
Copy/Cut is disabled in xls file on worksheet_open. It is only enabled after xls file is closed, hence the above code.
The problem is that if I select file-->close and then cancel button on the xls file, xls file remains open and the code for Workbook_BeforeClose is also executed thus enabling copy/paste.
~BS.