title: Calorie Multiplier
body: <p>I am trying to program a calculator that works out how many calories you have burnt based on their average speed. Currently I cannot get the Calories burnt correct.</p>
  
  <pre><code>Dim Distance As Double
      Dim Duration As Double
      Dim Speed As Long
      Dim Caloriesburnt As Integer
      Dim Multiplier As Integer
  
      Distance = nupDistance.Value
      Duration = nupDuration.Value
  
      Speed = Distance / Duration
      txtAverageSpeed.Text = Speed
  
  
      If txtAverageSpeed.Text &lt;= 5 Then
          Multiplier = 472
  
      ElseIf 5 &lt; txtAverageSpeed.Text &lt;= 6 Then
          Multiplier = 590
  
      ElseIf 6 &lt; txtAverageSpeed.Text &lt;= 7 Then
          Multiplier = 679
  
      ElseIf 7 &lt; txtAverageSpeed.Text &lt;= 8 Then
          Multiplier = 797
  
      ElseIf 8 &lt; txtAverageSpeed.text &lt;= 9 Then
          Multiplier = 885
  
      Else
          Multiplier = 994
  
      End If
      Caloriesburnt = Multiplier * Duration
      txtCaloriesBurnt.Text = Caloriesburnt
  </code></pre>