Hi,
I would like to be able to do the following using String.Replace, but I can't get it to work because it is case sensitive.
--------------------------------------------------------------
Private Sub Button5_Click()
Dim myStr As String
myStr = "ABcd abCD"
MsgBox(myStr.Replace("AB", "yz"))
End Sub
--------------------------------------------------------------
I would like the message box to return 'yzcd yzCD'.
Does anyone know how I can do this like I used to be able to in VB6 so it replaces all instances of the searched for string no matter what the case (ie not needing to specify AB, Ab, aB or ab in the search for part.
Many thanks in advance
Stuart
I would like to be able to do the following using String.Replace, but I can't get it to work because it is case sensitive.
--------------------------------------------------------------
Private Sub Button5_Click()
Dim myStr As String
myStr = "ABcd abCD"
MsgBox(myStr.Replace("AB", "yz"))
End Sub
--------------------------------------------------------------
I would like the message box to return 'yzcd yzCD'.
Does anyone know how I can do this like I used to be able to in VB6 so it replaces all instances of the searched for string no matter what the case (ie not needing to specify AB, Ab, aB or ab in the search for part.
Many thanks in advance
Stuart