Path Property of Application Object VBA

Path Application Property in VBA is used to get the complete path to the application or workbook. It excludes the final separator and name of the application. Please find the more details about path property of application object in the following section.



50+ Project Management Templates Pack
Excel PowerPoint Word

Advanced Project Plan & Portfolio Template
Excel Template

Business Presentations Templates Pack
PowerPoint Slides

20+ Excel Project Management Pack
Excel Templates

20+ PowerPoint Project Management Pack
PowerPoint Templates

10+ MS Word Project Management Pack
Word Templates

VBA Path Application Property – Syntax

Here syntax for Path Property of application object in VBA.


Where Path as String.
In the above syntax Application represents object and Path is the Property of Application object.

VBA Path Application Property: Example 1

Please find the below example for Path Property of application object in excel VBA. The below example displays the complete path of the application in Excel window.

Sub Appl_Path()
'Path is the property of application object
MsgBox "The application path is :" & Application.Path
End Sub


The application path is :C:\Test

VBA Path Application Property: Example 2

Please find the below example it will give the complete path of the workbook or application.

Sub WrkBk_FulPath()
'Path is the property of application object
MsgBox "Workbook full path is :" & ThisWorkbook.FullName
End Sub


Workbook full path is : C:\Test\MyFile.xlsm

VBA Path Application Property – Instructions

Please follow the below steps to execute the VBA code to save the excel file.
Step 1: Open any existing Excel Application.
Step 2: Press Alt+F11 – This will open the VBA Editor.
Step 3: Insert a code module from then insert menu.
Step 4: Copy the above code and paste in the code module which have inserted in the above step.
Step 5: Now press F5 to execute the code.
Step 6: The above macro or code displays the application path in the message box window.


Leave A Comment

Related pages

vba connect to sql servermicrosoft excel vbavba activeworkbook.savequestions asked in interview with answers for freshersexcel macro programming pdfformulas in vbamacro workbookinterior vbaadvanced excel macros examplesvba open access database from excelhow to protect a excel workbookbasic sql interview questions and answersproject status dashboard excelkpi dashboard excel templatesumif excel functioncolumn addition worksheetexcel microssetting up a pivot tablecreate checklist in excelvba linefeedexcel combobox vbaadvanced vlookup excel 2010vba connect to sql serverunhide cells exceldim conn as new adodb connectionvba knowledgemicrosoft excel merging cellsdelete worksheet vbahow to create stock chart in excel 2007mysql adodb connection stringunhiding columns in excelvba left stringxlworkbook saveashow to merge cells in excel with data in themconnect excel to sql serverchart wizard on excelexcel vlookup vbalcase vbavba rows autofitsurface charts in excelvb6 directory existsvba for outlookcool excel sheets3d pie chart excelvba block commentmsgbox function in vbvlookup limitationscombine worksheetsexcel vba alertsumif function exampledelete empty rows in excelcombine worksheetsloop for vbausing vbahow to protect workbook in excelcolumns vbahow to find duplicate values in excelactivex vbavba format cellexcel macro for beginnersvba variable rangevlookup formula explanationsql ddl dml dcl tcl commands pdfif with multiple conditions excelvba move fileseffort estimation template for software developmentexcel macros basicsexcel macro while loopcreating checkboxes in excelvba code open filestacked pie chart excel