Question:
How can I load a value set into a unit at run time?
Solution:
To do so, you must use the following Formula methods:
This method loads a value set into a unit, where bstrformulaName is the name of the module inside the project and object is a Viewer object. When executed, it opens a window for selecting a value set and a unit; it also enables changing the values being loaded.
Example: Application.LoadFormulaDlg “Formula1”
This method loads a specific value set (for example, “Value 1“) into a specific unit (for example, “Unit 1“). It shows a window for editing the values to be loaded.
object.LoadFormulaValuesQuiet bstrformulaName, bstrunitName, bstrvalueName
This method loads a specific value set (for example, “Value 1“) into a specific unit (for example, “Unit 1“). However, It does not show a window for editing the values to be loaded.
Example: Application.LoadFormulaValuesQuiet “Formula1”, “Unit 1”, “Value 1”