I cannot get the following nested IF statements to work and get the "Else without If" error for the first Else If statement. I had assumed the first "If" would apply to this
Can anyone spot where I got the code wrong?
Code:
Private Sub ReconcileNow()
If txtTValue = "" Then
Exit Sub
End If
If C1 = 1 Then
If Minus = 1 Then
txtTaC1 = CDbl(txtTpC1) - CDbl(txtTValue)
txtTaC2 = ""
Else
If Minus = 0 Then
txtTaC1 = CDbl(txtTpC1) + CDbl(txtTValue)
txtTaC2 = ""
End If
ElseIf C2 = 1 Then
If Minus = 1 Then
txtTaC2 = CDbl(txtTpC2) - CDbl(txtTValue)
txtTaC1 = ""
Else
If Minus = 0 Then
txtTaC2 = CDbl(txtTpC2) + CDbl(txtTValue)
txtTaC1 = ""
End If
Else
If Round = 1 Then
If Minus = 1 Then
txtTaR = CDbl(txtTaR) - CDbl(txtTValue)
Else
If Minus = 0 Then
txtTaR = CDbl(txtTaR) + CDbl(txtTValue)
End If
End If
End Sub
Can anyone spot where I got the code wrong?