I have recently started with Visual Basic so I am not very familiar with it. I am new to computing so bear with me! I am attempting to make a form program that counts a specific word in a sentence. I haven't got very far with it as you can see from my code. All I have got it to do is tell me if the two text boxes match. I would really appreciate it if anyone could help me with a solution! Many thanks.
code:
Public Class Form1
Dim Counter As Integer = 0
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Word.Text = Sentence.Text Then
Counter1.Text = Counter + 1
End If
End Sub
End Class