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.

PREMIUM TEMPLATES LIMITED TIME OFFER

ON SALE80% OFF

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.

Application.Path

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

Output:

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

Output:

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.

LIMITED TIME OFFER

Leave A Comment


Related pages


vlookup excel templateexcel template checklistextract hyperlink from excelexcel unhide all rowsms excel password protectvba code for accessvba excel function returnexcel macros how todifference between operand and operatorfor each sheet in workbookexcel fixed rowexcel advanced filter vbaexcel delete blank rowactivate workbookcategories of sql commandshow to get rid of duplicates in excelexcel repeat last actionhyperlink on excelhow to check for duplicates excelvba excel automationdefined names in excelnamed cells in excelpivot table option in excel 2010easy excel macroshow to use sum ifxml vba excelapplication.screenupdatingconsolidate excel worksheets into onesql technical interview questions and answers pdfexcel merge columnsmerge & center the selected cellsexcel vba cellsexcel vba examples 2007logical operations in excelwhere to find pivot table in excelfso.copyfilepivot tables exampleshow to unhide a worksheet in excelvba cutvba selected rangecolumn vbasql objective type questions and answers pdfhow to create defined names in excelnew adodb.connectionvba recordsethow to create a new worksheet in excelexcel macro enableexcel remove macrosworkbooks.worksheetsvba open files in folderexcel vba getopenfilenamevlookup range lookuphow to add a new worksheet in excelvba code for checkboxadvanced vba excel examplesconditional logic excelexcel dashboard graphshide tabs in excelexcel hide cellexcel dynamic dashboardvba dashboardexample of vba codeprotect pivot tablevba statementscount number of rows in excel vbavisual basic list boxexcel 3d chartvba isblankunderline fontshow to find duplicates in excel sheetexcel construction estimating templaterun macro from vba