title: Adding two numbers with a function
body: <p>I am writing VBA code to add two numbers:</p>
  
  <pre><code>Option Explicit
  
  Dim x As Integer, y As Integer
  Function addtwo(x, y)
  addtwo = x + y    
  End Function
  </code></pre>
  
  <p>This is not a good function since I have to manually input the values x and y to get for the result. How can I modify the codes so it can work with any two numbers, no matter integers or numbers with decimals?</p>