Hello There,
I have mentioned the below code in workbook :
In the module ExecuteCode code as below:
When I open another workbook, the code form the first file gets executed on Enter Key.
I would like the code Application.OnKey "{ENTER}" to get working only for the first workbook and not any of the open workbooks and they should work in a normal way when Enter key pressed.
Could you please advise how this can be achieved?
Thanks & regards,
Don
I have mentioned the below code in workbook :
Code:
Private Sub Workbook_Open()
....
....
Application.OnKey "{ENTER}" "ExecuteCode"
....
End sub
In the module ExecuteCode code as below:
Code:
Sub ExecuteCode
<do some code>
End Sub
When I open another workbook, the code form the first file gets executed on Enter Key.
I would like the code Application.OnKey "{ENTER}" to get working only for the first workbook and not any of the open workbooks and they should work in a normal way when Enter key pressed.
Could you please advise how this can be achieved?
Thanks & regards,
Don