silentwolf
Active member
- Local time
- Today, 02:35
- Joined
- Jun 12, 2009
- Messages
- 575
Hi again,
sorry guys cant seam to find something that works in my case.
I would love to replace a string with a "*" wildcard .
what I did try was this
but it does not work..
Would like to keep the rest of the string as it is just replace the word "Wuestenrot" or it could be "spellt wrong and be something like "Woastenrot"
so I like to find every possible way of it and change it to "Wüstenrot"
Could someone help please?
The above code only works when I write the correct spelling.
Many thanks
sorry guys cant seam to find something that works in my case.
I would love to replace a string with a "*" wildcard .
what I did try was this
Code:
Public Function ReplaceWuestenrot(ByVal strText As String) As String
Dim strOld(0 To 1) As Variant
Dim strNew As String
Dim i As Integer
strOld(0) = "W*stenrot"
strNew = "Wüstenrot"
For i = LBound(strOld) To UBound(strOld)
strText = Replace(strText, strOld(i), strNew)
Next i
ReplaceWuestenrot = strText
End Function
but it does not work..
Would like to keep the rest of the string as it is just replace the word "Wuestenrot" or it could be "spellt wrong and be something like "Woastenrot"
so I like to find every possible way of it and change it to "Wüstenrot"
Could someone help please?
The above code only works when I write the correct spelling.
Many thanks