If I have many macro workbooks open at the same time...
Some names such as UserForm
, Module
, etc. overlap.
How to fully qualified names from VBA project?
for example:
VBAProject(ThisWorkbook.Name).UserForm1.CommandButton1.Caption
MyNameOfProject(ThisWorkbook.Name).UserForm1.CommandButton1.Caption
When the user renames the workbook, the project name remains the same... Ideally completely avoid the workbook name, if posible?
In one workbook, for example, there is a module with a function that I would like to use from the other workbook. In general, I want things to be under control. Fully qualified as much as possible.
When you are referring to
userform
within the same work, you can just use:From:
To:
However, for referring userform from another workbook, please avoid to do so...