Can anyone tell me what is wrong with this code, please?

VB Code:
  1. If Counter < 2 AndAlso txtSin.Text <> "" Then Sine = CDbl(txtSin.Text)
  2.             Counter += CByte(1)
  3.            elseIf Counter < 2 AndAlso txtCos.Text <> "" Then Cosine = CDbl(txtCos.Text)
  4.  
  5.             End If

Both the ElseIf and End If statements have the blue squiggly lines under them with the tooltip saying they must be preceded by a matching If statement