Hello
I have a workbook with a bunch of macros, some of which are triggered when "enter" button is pressed (I used Application.OnKey).
The issue I am having is that if I open a new excel file , it seems the new file is binded in some way to the workbook already open.
As a result, if I close the workbook and then proceed to press enter in the new excel file, I will get a error trying to re-open the workbook.
I have tried to dis-activate the Application.OnKey in a event before closing the workbook but it seems the issue is that the macros from the workbook is binded to the new excel file. As a result, if I close the workbook, it will still try to re-open it when i press enter in the new excel file.
>Code used to activate on key event :
Application.OnKey "{ENTER}", "myfunc"
>Code to dis-activate on key event
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.OnKey "{ENTER}", ""
End Sub
Note: I am using excel 2013
Analysis for office version: 1.4.13
I have the same situation using bex analyser for excel 2013 itself but I am not getting this issue.
Can anybody please help with this?
Many many Thanks