Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.Run Method (Excel)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Runs a macro or calls a function. This can be used to run a macro written in Visual Basic or the Microsoft Excel macro language, or to run a function in a DLL or XLL.

Syntax

expression . Run( Macro , Arg1 , Arg2 , Arg3 , Arg4 , Arg5 , Arg6 , Arg7 , Arg8 , Arg9 , Arg10 , Arg11 , Arg12 , Arg13 , Arg14 , Arg15 , Arg16 , Arg17 , Arg18 , Arg19 , Arg20 , Arg21 , Arg22 , Arg23 , Arg24 , Arg25 , Arg26 , Arg27 , Arg28 , Arg29 , Arg30 )

expression A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
MacroOptionalVariantThe macro to run. This can be either a string with the macro name, a Range object indicating where the function is, or a register ID for a registered DLL (XLL) function. If a string is used, the string will be evaluated in the context of the active sheet.
Arg1-Arg30OptionalVariantAn argument that should be passed to the function.

Return Value

Variant

Remarks

You cannot use named arguments with this method. Arguments must be passed by position.

The Run method returns whatever the called macro returns.

See also

Concepts

Application Object

© 2017 Microsoft