borderAndreaVB free resources for Visual Basic developersborder

AndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincani
:: Returns the full application path with the '\' terminator...

Author  

David Costelloe

Language  

VB5, VB6

Operating Systems  

Windows 95, 98 and NT
Module

Public Sub CheckPath(MyPath$) ' Adds the \ to the Application Path when required
    MyPath$ = App.Path
    If Not Right(MyPath$, 1) = "\" Then
        MyPath$ = MyPath$ & "\"
    End If
End Sub

Usage

'Usage:
Private Sub Command1_Click()
    Dim MyPath As String
    Dim FileName As String

    FileName = App.EXEName
    Call CheckPath(MyPath$)
    MsgBox "The location of: " & FileName & " is " & MyPath$ & vbCrLf & " Full Path: " & MyPath$ & FileName
End Sub

:: Navigation

Home

Files and Disks Tips

Previous Tip

Next Tip

:: Search this site
Google
:: Related Topics
icon 25-02-2006 Re: please tell me why my customer form gets hung up by kabba
icon 18-10-2005 Re: Recordset Cursor? by yronium
Partners: Download Actual Software | Free Software Download | large format printing
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder