| {\rtf1\ansi\ansicpg1252\deff0\deflang1044{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 Simply corrects any trailing \\ eg. c:\\\\test.txt to c:\\test.txt \par \par Public Function CorrectPath(FilePathName) \par Dim buffer \par For i = 1 To Len(FilePathName) \par If Mid(FilePathName, i, 2) <> "\\\\" Then \par buffer = buffer & Mid(FilePathName, i, 1) \par End If \par Next \par CorrectPath = buffer \par End Function \par \par Or better still: \par \par Str2=Replace(Str1, ":\\\\", ":\\") \par } |
Correct Path |
India web developer web development India | India web development company India ecommerce web developer