hi guys, i know this might look like a n00b's homework assignment - but it aint, im studying VB for myself.
Im trying to do this tutorial over here, cuz everybody said it's good
Prob is when i try to press the confirm button, error message pops up saying "end if without block if"? I've tried organizing my code but that doesn't seem to work... I don't get it, am I using incorrect syntax?
Here's the code for the confirm button below
Private Sub confirm_Click() Dim hoursbox As Integer Dim deductbox As Integer Dim rate As Integer Dim grosalary As String Dim netsalary As String If op1.Value = False _ And op2.Value = False _ And op3.Value = False Then grosalary = "invalid" And netsalary = "invalid" End If If op1.Value = True Then rate = 10 End If If op2.Value = True Then rate = 20 End If If op3.Value = True Then rate = 30 End If grosalary = rate * hoursbox netsalary = grosalary - deductbox End Sub