title: How to pass parameters from VBA to a DLL file or an API
body: <p>I'm trying to delegate a huge processing VBA code to an outside application. My outside application can be a DLL file or an API.
  To do that I need to pass parameters from VBA to a DLL file Or the API. These parameters can be string, integer or an Array.
   I already found an example on how to pass Integers from VBA to DLL file</p>
  
  <p>this is my C# code that have as an input three integers which will be sent by VBA. In this example I just generate the DLL file and I call it in VBA,  but I need to do the same with arrays.</p>
  
  <pre><code>[Guid("A33BF1F2-483F-48F9-8A2D-4DA68C53C13B")]
  [ClassInterface(ClassInterfaceType.AutoDual)]
  [ComVisible(true)]
  public class MyFunctions
  {
      public MyFunctions()
      {
  
      }
  
      public double MultiplyNTimes(double number1, double number2, double timesToMultiply)
      {
          double result = number1;
          for (double i = 0; i &lt; timesToMultiply; i++)
          {
              result = result * number2;
          }
          return result;
      } 
  }
  </code></pre>
  
  <p>How can I pass arrays from VBA TO DLL file or API ?</p>