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


how to do pivot tables excel 2010awesome excel chartswhat is excel macro programmingxls macro programmingvba access tutorialexcel yearly schedule templateexcel if statement multiple conditionsvba global variableshow to merge cells in excel with data in themdashboard creation in excelexcel connect to mysqlexcel graphing tutorialmacros excel tutorialautofilter macronested if vbaobjexcel.workbooks.openpaste vbaexport recordset to exceltechnical interview questions for it freshersinsert a row above the selected rowexcel protected worksheetexcel macro to insert rowsexcel vba status bar progresspassword sheet excelcapacity planning template excelremove hyperlinks excel 2007linking cells in excelexcel formula to merge cellshow to convert excel to xmlvba sql connectionhow to create macros in excel 2003excel vlookup rangevba tricksdeveloper ribbon in excelexcel macros 2007project management spreadsheet templateslistbox codehow to create a stacked bar chart in excel 2007advanced excel tutorial pdfmonthly schedule template excelvba access sqlms sql interview questions and answers pdfhow to unhide all sheetsexcel vba select columnssyntax excelactivate workbookexcel vba dim rangeexcel consolidatesumif formula in excel 2007vba application.enableeventsvba sql insertvba if statementssample toshow to insert a textbox in excelpie chart template excelexcel isblank functionunlock excel fileexcel vba connectiondml and ddl statements in sqlvba excel active cellaccess messageboxapplication filedialog msofiledialogfilepickerhow to unhide everything in excelinsert checkbox in excelvba record macrovba match functionvba dsn connection stringvba color rgbworkbook unprotect vbaexcel 2013 comboboxiferror excel formulavba for loopunprotect excel 2010 without passwordproject timeline powerpoint template freevbscript code examplesremove duplicates macrowhat is the lookup function in exceloutlook meeting minutes templatedefinition of filtering in excel