fabiano.batista

Reusing same VBA code on multiple ProcessBook displays

Discussion created by fabiano.batista on Dec 16, 2013
Latest reply on Dec 18, 2013 by Asle Frantzen

Hello everyone,

 

I have a ProcessBook display with VBA code that will be used to bring values from a set of tags. The same display could be used to see values from other sets of tags (similar in nature). The simpler solution is just to make copies of the original display and change the tag references in them. However, this solution is not very scalable because whenever I need to perform changes on the code of one display, I would have to do the same in the other derived displays. It just would be hard to maintain.

 

Using add-in is not an option for me, because it would require IT to allow me to register the addin on all client machines. I prefer to try to accomodate my application on current IT scenario.

 

The solution of replacing the tag name on the fly would not make the display very responsive. I have more than 300 dynamic symbols using AF data references, and it would just take a few seconds to happen, what would negatively affect the user experience.

 

I also found that I could create a .bas file to load my code on wharever display I open, but that would require the users to always have another file with the PB file.

 

Is there a way to have my code at the Workbook level or can create modules that could be shared among different PB files? Does anyone see another solution?

 

Regards,

 

Fabiano

 

 

 

 

 

 

Outcomes