title: Conversion from string "" to type 'Double' is not valid
body: <p>This function keeps giving me problem I cannot seem to find the right combination to get it working. I am trying to apply discount if certain amount is reached but I keep getting conversion error. What do I need to do so I define everything so it works?</p>
  
  <pre><code>Function coupon() As Decimal
  
          Dim decdiscount As Decimal
          Dim inta, intb, intc As Decimal
  
          inta = 20.0
          intb = 40.0
          intc = 60.0
  
          If lblSubtotal.Text &gt; inta Then
              decdiscount = 0.05
          End If
  
  
          If lblSubtotal.Text &gt; intb Then
              decdiscount = 0.1
          End If
  
  
          If lblSubtotal.Text &gt; intc Then
              decdiscount = 0.2
          End If
  
          Return decdiscount
      End Function  
  </code></pre>