Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Analysis, edition for Microsoft Office
Viewing all articles
Browse latest Browse all 1521

Conflict when workbook and excel file opened at the same time

$
0
0

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


Viewing all articles
Browse latest Browse all 1521

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>