Is there a place to store VBA code that's accessible to all Microsoft Office products..?

前端 未结 2 1153
天涯浪人
天涯浪人 2021-01-23 01:09

Is there a way of storing VBA source code that\'s common and accessible to all Microsoft Office products..? I have a variety of functions which I use in both Access and Excel, a

2条回答
  •  有刺的猬
    2021-01-23 01:44

    If you want to use VBA in the same Office program (e.g. one Excel file to another, or one Access file to another), you don't need to use any special kind of file. You can add a reference to an external database or worksheet with macro's enabled.

    Navigate Tools - References - Browse - Excel/Access file - Add the file

    See the following screenshot:

    You can't use files across different Office applications this way, but you shouldn't. Each application has different built-in functions, so your code is likely incompatible anyway.

提交回复
热议问题