Run Method of Application Object VBA

Run Application Method in VBA is used to runs a procedure or function which is written in Visual Basic Application. Please find the syntax and remarks of Run Application Method in VBA.

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 Run Application Method – Syntax

Here syntax for Run method of application object in VBA.

Application.Run(

[Macro], [Arg1], [Arg2],…, [Arg30])

Where
Macro: It is an Optional parameter. It is used to run the macro.
Arg1 to Arg30: It is an Optional parameter. It is used to passed to the function.
In the above syntax Application represents object and Run is the method of Application.

VBA Run Application Method: Example 1

Please find the below example for Run method of application object in excel VBA.

Sub Appl_Run()
Application.Run "'Workbook1.xls'!MyMacro"
End Sub

VBA Run Application Method: Remarks

Please find the below remarks of Run method of application object in excel VBA.
• We cannot use named parameters in this method.
• We cannot pass objects as parameter to procedures by using run method.

VBA Run Application Method – 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.

LIMITED TIME OFFER

Leave A Comment


Related pages


how to eliminate rows in exceloutlook vba referenceminute meeting templatesvba deselectcosting excel templatevb code to open a filehlookup formula in excel with exampletelecommunications interview questions with answers pdfhow to convert xml to excel 2007how to activate macros in excel 2007syntax for sql commandshow to create dynamic charts in excelfree gantt charts in excelexcel vba font colordatabase dmlexcel hidden workbookvba open workbookrefresh excel spreadsheetproject estimation template excelvba excel graphcombine data from multiple worksheetsadodb.connection providerhow to change column width in excel 2010redim array vbaproject dashboard template powerpoint freerecord macro in excel 2007vba excel pastevlookup in excel 2010 exampleexcel vba forms advancedgraph chart in excelhow to draw chart in excelconditional vlookupvba passing variableserror vbaspecialcells vbachange row to column in excelexcel pie chart templatessql introduction for beginnershow to delete blank cells in excelexamples of dashboards in excelapplication workbooksvlookup with choose functionexamples of excel spreadsheetsexcel macro format cellmacro to save excel filedcl statementssas macros basicssql projects for beginnersextract hyperlink from excelopen userform vbavba loop syntaxuserform word 2010vba basics pdfvba empty cellddl dmlvba declare global variableuse of vlookup in excel 2007 with examplevb code to open a fileexcel hiding columnsexcel 2013 if statementvba class methodsunlock password exceladvanced excel macrocell vba excelwhat are dml commandsmacro unprotect sheetduplicate cells excelexcel sales dashboardexcel macro to remove duplicateslogical operators excelexcel unhide columnvlookup example datamacro delete rowunhide columns in excel 2010ms office gantt chart templateexcel macro nested ifexcel project timeline template gantthow to use vlookup in excel 2010 step by step