No code from personal.xlsb will run even if a reference to pers. workbook exists! You can be sure that no code from personal.xlsb will be run, instead of the one inside the workbook where the call is made.
Even if you added a reference to your personal.xlsb, for identic macro names VBA will choose the one in the workbook where the code runs. To check that, please, try the next scenario:
- Create in your personal workbook the next macro:
Public Sub MyMsgBox()
MsgBox "Hello from Personal workbook!"
End Sub
- Then create the next macro in a standard module of your new workbook:
Sub MyMsgBox()
MsgBox "Hello from This workbook!"
End Sub
- Create a simple checking
Sub
, of course, in the new workbook, add a reference to your personal.xlsb workbook and run it:
Sub testMyMsgBox()
MyMsgBox
End Sub
- It will run the
Sub
in your workbook. Now, comment the Sub
from your workbook and run testMyMsgBox
again. It will ran the procedure from personal.xlsb...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…