greekpatriott
Technical User
Want to change this function
Public Function WBSTopLevel(Val1 As String) As String
If InStr(Val1, ".") > 0 Then
WBSTopLevel = Left(Val1, InStrRev(Val1, ".") - 1)
Else
WBSTopLevel = Val1
End If
End Function
to this
Public Function WBSTopLevel(Val1 As String) As String
If InStr(Val1, "." Or "-") > 0 Then
WBSTopLevel = Left(Val1, InStrRev(Val1, "." Or "-") - 1)
Else
WBSTopLevel = Val1
End If
End Function
But it does not work. Does anyone have a clue how to add more simples in this module?? Cheers
Public Function WBSTopLevel(Val1 As String) As String
If InStr(Val1, ".") > 0 Then
WBSTopLevel = Left(Val1, InStrRev(Val1, ".") - 1)
Else
WBSTopLevel = Val1
End If
End Function
to this
Public Function WBSTopLevel(Val1 As String) As String
If InStr(Val1, "." Or "-") > 0 Then
WBSTopLevel = Left(Val1, InStrRev(Val1, "." Or "-") - 1)
Else
WBSTopLevel = Val1
End If
End Function
But it does not work. Does anyone have a clue how to add more simples in this module?? Cheers