Quote:
|
Originally Posted by MikeTheBike
Alternatively you could put the code into a separate Workbook and save this as an addin (.xla) file and set a reference to this form both abc.xls and xyz.xls.
MTB
|
I cannot do the above since in this case I cannot use an addin. Currently I am using the following for xyz.xls
Code:
Private Sub Workbook_Activate()
Application.OnDoubleClick = "" 'Our templates run a macro on doubleclick by default- so am disabling double click for this file only
End Sub
Private Sub Workbook_Deactivate()
Application.OnDoubleClick = "DblClickInABC" 'Macro from other file/Enabling double click again on deactivate
End Sub
I have added the file abc.xls that has the macro "DblClickInABC" in References of xyz.xls for above code to work (calling macro from file abc.xls to xyz.xls)
Here problem is that, if I close xyz.xls and double click on abc.xls, it opens the file xyz.xls even if it was not called anywhere.. is it because of References or am I missing something here?
~BS