See code below. I am attempting to do a simple string substitution (replace an Asc() 225 with a space and an Asc() with a dash "-". when the code is run, instead of looping thru for the length of the string, it just executes one time.... and then exits the function, and then returns again for the number of iterations of the string length??????
Any and all help is appreciated. Here is an example string: Receiver,áDirecTVáBasicáDefinition
The return string from the function should be: Receiver, DirectTV Basic Definiton
Function AddSpaceDash(LookIn As String) As String
Dim Ctr As Integer
Dim strHold As String
Dim codeHold As Integer
Dim lLength As Integer
lLength = Len(LookIn)
For Ctr = 1 To lLength
Select Case Asc(Mid(LookIn, Ctr, 1))
Mid(strHold, Ctr, 1) = " "
Mid(strHold, Ctr, 1) = "-"
Mid(strHold, Ctr, 1) = Mid(LookIn, Ctr, 1)
AddSpaceDash = strHold