My assignment was to write a program that counts the number of spaces in a string provided by the user . This is where I am at with my code. Any help is greatly appreciated. Thank you

Dim mystring As String
Dim TestLength As Integer
Dim SearchSpace As String
Dim TestSpace As Integer
Dim RunningTest As Integer

SearchSpace = " "
mystring = txtUserInput.Text
TestLength = Len(mystring)
RunningTest = 0


TestSpace = InStr(mystring, SearchSpace)
RunningTest = RunningTest + 1
TestSpace = InStr(TestSpace, mystring, SearchSpace)

Loop Until TestSpace = 0