I have the following problem. I have a string with different surnames seperated by " ". I want to make a function that gives me the first letter of the second surname (In reality what I want to do is more complex). I made the following function:
Public Function Aanschrijfnaam(VoorNamen) As String
Dim Voorletters(10) As Variant
Voorletters = Split(VoorNamen)
Aanschrijfnaam = Left(Voorletters(2), 1)
End Function
But this doesn't work. The compiler says there is something wrong with: voorletters = Split (VoorNamen); what is wrong?
Public Function Aanschrijfnaam(VoorNamen) As String
Dim Voorletters(10) As Variant
Voorletters = Split(VoorNamen)
Aanschrijfnaam = Left(Voorletters(2), 1)
End Function
But this doesn't work. The compiler says there is something wrong with: voorletters = Split (VoorNamen); what is wrong?