Code:
' ----------------------------------------------------------------
' Procedure Name: remove4th
' Purpose: Routine to remove the 4th char (space in sample) of a string
' Procedure Kind: Function
' Procedure Access: Public
' Parameter sin (String): Incoming string
' Return Type: String
' Author: Jack
' Date: 21-Apr-23
' Relates to: https://www.accessforums.net/showthread.php?t=87978
' ----------------------------------------------------------------
Function remove4th(sIn As String) As String
remove4th = Left(sIn, 3) & Mid(sIn, 5)
End Function
Sample function call
Code:
Sub testw()
Dim sin As String
sin = "PRL 3435 COLOR COORD"
Debug.Print remove4th(sin)
End Sub
Result:
PRL3435 COLOR COORD