I'm getting an error with this code that states the Right command is looking for an integer. What am I doing wrong?
Code:Dim strPath As String = Application.StartupPath
If Right(strPath, 1) <> "\" Then
strPath = strPath & "\"
End If
Printable View
I'm getting an error with this code that states the Right command is looking for an integer. What am I doing wrong?
Code:Dim strPath As String = Application.StartupPath
If Right(strPath, 1) <> "\" Then
strPath = strPath & "\"
End If
Right() is a vb6 function , try this ... ( which works fine )
VB Code:
Dim strPath As String = Application.StartupPath If Not strPath.EndsWith("\") Then strPath += "\" MessageBox.Show(strPath) End If
Cool... thanks!:cool: