Hi all, Is it possible to manipulate a string like this : Trasform the syntax below from : c:\\foldername01\\foldername02\\filename.dwg to c:\foldername01\foldername02\filename.dwg It's like a search (\\) and replace (\) in word or excell but in VBA... Thanks a lot in advance.... Gilles
You can use the Replace function : .... dim strResult as string strResult= Replace("c:\\foldername01\\foldername02\\filename.dwg", "\\", "\") ..... Jean-Yves
Hi Gilles, Here's an example: Code: strInput = "c:\\foldername01\\foldername02\\filename.dwg" 'split the string varItems = Split(strInput, "\\", , vbTextCompare) 'rebuilt the string For i = LBound(varItems) To UBound(varItems) If i < UBound(varItems) Then strTransf = strTransf & varItems(i) & "\" Else strTransf = strTransf & varItems(i) End If Next i Please note that Split is not available in VB5. Michel