VBA global variables, multiple workbooks

前端 未结 4 1764
轻奢々
轻奢々 2021-01-14 19:08

I have a VB application, that uses some global variables to store data that is required by multiple forms and modules, this works fine. However if a user opens up another wo

4条回答
  •  情深已故
    2021-01-14 20:05

    Your global variables are globally scoped to your Addin. I would store them in hidden names in each workbook, and then reset your global variables each time a workbook is activated (and also re-store the values in the deactivated workbook).

提交回复
热议问题