Website Design United States, Website Design California, Website Designing United States, Website Designing California

Add Slash to Path - Visual Basic 6

This will add a slash to the end of a path if there isn't one.
i.e. App.Path returns c:\ or c:\dir
Calling this guarantees there is a \ at the end of path. To use it call it and supply the path. It will return a path that will have a \ at the end of the path.

Public Function AddSlash(pstrDir As String) As String
If Right$(pstrDir, 1) <> "\" Then
AddSlash = pstrDir & "\"
AddSlash = pstrDir
End If
End Function

42 B Malviya Nagar , New Delhi-110017

Skype: manmeetsi
Tel: 91-011-40502005, 9810067295



© 2008-2009