title: VBA - Call function inside a sub (module)
body: <p>I have the following function in <code>VBA</code>:</p>
  
  <pre><code>Public Function lorh(custo As Integer)
  If custo &gt; 10.99 And custo &lt;&gt; 0 Then
      lorh = "1.4"
  Else
      If custo &lt; 11 And custo &lt;&gt; 0 Then
          lorh = "1.35"
      Else
          If custo &lt;= 0 Or custo &lt; 0 Then
              lorh = "Valor Inválido"
          End If
      End If
  End If
  End Function
  </code></pre>
  
  <p>Now what I need is to call this function starting from a sub or better from a macro, so I can associate it to a custom button on the <code>excel</code> toolbar . Can anyone guide me? </p>