Hello, I'm back again with the same code however I have tried everything and I am still stuck. The message box works, and all of the values are correct but the last value. I would rather not change the message box code, but maybe just the last line where the 'Total pay:' is. As I said, all of the values are correct in the message box but the Basic hours pay will not add the Overtime hours pay for some reason.
Please help :)
Dim TotalPayWithoutOvertime As Double
Dim HoursWorked As Double
Dim DoubleRate As Double
Dim TotalPay As Double
Dim OvertimePay As Double
If chkOvertime.Checked = True And txtHoursOvertime.Text = "" = False And lstHourlyRate.SelectedItem = True _
And txtHoursOvertime.Text = True Then
MessageBox.Show("Basic hours worked: " + txtHoursWorked.Text & vbCr & vbLf &
"Hourly rate of pay: " & lstHourlyRate.SelectedItem.ToString() & vbCr & vbLf &
"Basic pay: " & (Double.Parse(txtHoursWorked.Text) * Double.Parse(lstHourlyRate.SelectedItem.ToString())) & vbCr & vbLf &
"Overtime hourly rate: " & lstHourlyRate.SelectedItem * 2 & vbCr & vbLf &
"Overtime pay: " & txtHoursOvertime.Text * lstHourlyRate.SelectedItem * 2 & vbCr & vbLf &
"Total pay: " & txtHoursWorked.Text * lstHourlyRate.SelectedItem + txtHoursOvertime.Text * DoubleRate)
Else
MsgBox("You must fill everything in!")
End If