I can't think of a way of doing it "all at once", but what you appear to be describing is a straight substitution of letters. You've mentioned VB6 as well as VB10 in your tags so I'm not sure what you're after. I've used VB.net but there are ways to convert this to VB6 if you really have to.
This is something I've cobbled together ... it works but there are better ways, this is just to get you going. Note, I haven't used Replace because you could end up replacing characters you've already substituted.
Dim SourceChars As String() = New String() {" ", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
Dim ChangeChars As String() = New String() {" ", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "A", "B", "C"}
Dim test As String = "I do"
Dim test2 As StringBuilder = New StringBuilder("")
For i As Integer = 0 To test.Length - 1
Dim testString As String = test.Substring(i, 1)
Dim index As Integer = Array.FindIndex(SourceChars, Function(s) s.Contains(testString.ToUpper()))
test2.Append(ChangeChars(index))
Next
Debug.Print(test2.ToString())
or using a Dictionary
Dim test As String = "I do"
Dim kvp As Dictionary(Of String, String) = New Dictionary(Of String, String)
kvp.Add(" ", " ")
kvp.Add("A", "D")
kvp.Add("I", "L")
kvp.Add("D", "G")
kvp.Add("O", "R")
Dim test2 As StringBuilder = New StringBuilder("")
For i As Integer = 0 To test.Length - 1
test2.Append(kvp(test.Substring(i, 1).ToUpper()))
Next
Debug.Print(test2.ToString())
You ought to include some checks for characters not in the list and note that
.ToUpper() on the lookup.