Print Friendly and PDF

Linking to a Macro-Enabled Spreadsheet

Ryan Roper -

This model shows how a VBA macro can be used to run calculations in Excel based on input from GoldSim. In this example, a VBA macro in Excel calculates the Least Common Multiple (LCM) of a list of input values provided from GoldSim. The LCM is then imported by GoldSim and displayed in the dashboard below. For comparison, the LCM is also calculated using a Script element that implements an algorithm very similar to the VBA algorithm. Enter the dashboard to run the model and see the results.

Experience Level:


Download the Model File:


  • VBA
  • excel
  • spreadsheet
  • macro
Have more questions? Submit a request