I have the following function in VBA:
Public Function lorh(custo As Integer)
If custo > 10.99 And custo <> 0 Then
lorh = "1.4"
Else
If custo < 11 And custo <> 0 Then
lorh = "1.35"
Else
If custo <= 0 Or custo < 0 Then
lorh = "Valor Inválido"
End If
End If
End If
End Function
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 excel toolbar . Can anyone guide me?