ChiTownDiva
Technical User
I keep getting an error message on a module I'm writing:
Public Function StripBegin(MyString As String, _
strSearch As String) As String
If MyString Like "0*" then strSearch = "0"
Else
If MyString Like "1*" then strSearch = "1"
Else
If MyString Like "2*" then strSearch = "2"
else
If MyString Like "3*" then strSearch = "3"
Else
If MyString Like "7*" then strSearch = "7"
Else
If MyString Like "A*" then strSearch = "A"
Else
If MyString Like "B*" then strSearch = "B"
Else
If MyString Like "C*" then strSearch = "C"
Else
If MyString Like "D*" then strSearch = "D"
Else
If MyString Like "F*" then strSearch = "F"
Else
If MyString Like "H*" then strSearch = "H"
Else
If MyString Like "K*" then strSearch = "K"
Else
If MyString Like "L*" then strSearch = "L"
Else
If MyString Like "NN*" then strSearch = "NN"
Else
If MyString Like "R*" then strSearch = "R"
Else
If MyString Like "W*" then strSearch = "W"
Else
If MyString Like "Y*" then strSearch = "Y"
Else
If MyString Like "ND*" then strSearch = "ND"
Else
If MyString Like "NP*" then strSearch = "NP"
Else
If MyString Like "NS*" then strSearch = "NS"
end if
StripBegin = strSearch
End Function
I keep getting an error saying that I have an "Else" missing...I don't see it.
Thanks
Public Function StripBegin(MyString As String, _
strSearch As String) As String
If MyString Like "0*" then strSearch = "0"
Else
If MyString Like "1*" then strSearch = "1"
Else
If MyString Like "2*" then strSearch = "2"
else
If MyString Like "3*" then strSearch = "3"
Else
If MyString Like "7*" then strSearch = "7"
Else
If MyString Like "A*" then strSearch = "A"
Else
If MyString Like "B*" then strSearch = "B"
Else
If MyString Like "C*" then strSearch = "C"
Else
If MyString Like "D*" then strSearch = "D"
Else
If MyString Like "F*" then strSearch = "F"
Else
If MyString Like "H*" then strSearch = "H"
Else
If MyString Like "K*" then strSearch = "K"
Else
If MyString Like "L*" then strSearch = "L"
Else
If MyString Like "NN*" then strSearch = "NN"
Else
If MyString Like "R*" then strSearch = "R"
Else
If MyString Like "W*" then strSearch = "W"
Else
If MyString Like "Y*" then strSearch = "Y"
Else
If MyString Like "ND*" then strSearch = "ND"
Else
If MyString Like "NP*" then strSearch = "NP"
Else
If MyString Like "NS*" then strSearch = "NS"
end if
StripBegin = strSearch
End Function
I keep getting an error saying that I have an "Else" missing...I don't see it.
Thanks