Action Method
Application Wait Method
Purpose
This method pauses a running macro until a specified time. Returns True if the specified time has arrived.
Syntax
Wait(Time)
Required Parameters
Time
The time at which you want the macro to resume, in Microsoft Excel date format.
Application Volatile Method
Purpose
This method marks a user-defined function as volatile. A volatile function must be recalculated whenever calculation occurs in any cells on the worksheet. A nonvolatile function is recalculated only when the input variables change. This method has no effect if it's not inside a user-defined function used to calculate a worksheet cell.
Syntax
Volatile(Volatile)
Optional Parameters
Volatile
True to mark the function as volatile. False to mark the function as nonvolatile. The default value is True
Application SharePointVersion Method
Purpose
This method returns the version number of SharePoint Foundation instances running at site for the specified URL.
Syntax
SharePointVersion(bstrUrl)
Required Parameters
bstrUrl
The URL of site to check.
Application Object
Application Methods
Application ActivateMicrosoftApp Method
Activates a Microsoft application. If the application is already running, this method activates the running application. If the application isn't running, this method starts a new instance of the application.
Application AddCustomList Method
Adds a custom list for custom autofill and/or custom sort.
Application Calculate Method
Calculates all open workbooks, a specific worksheet in a workbook, or a specified range of cells on a worksheet, as shown in the following table.
Application CalculateFull Method
Forces a full calculation of the data in all open workbooks.
Application CalculateFullRebuild Method
For all open workbooks, forces a full calculation of the data and rebuilds the dependencies.
Application CalculateUntilAsyncQueriesDone Method
Runs all pending queries to OLEDB and OLAP data sources.
Application CentimetersToPoints Method
Converts a measurement from centimeters to points (one point equals 0.035 centimeters).
Application CheckAbort Method
Stops recalculation in a Microsoft Excel application.
Application CheckSpelling Method
Checks the spelling of a single word.
Application ConvertFormula Method
Converts cell references in a formula between the A1 and R1C1 reference styles, between relative and absolute references, or both. Variant.
Application DDEExecute Method
Runs a command or performs some other action or actions in another application by way of the specified DDE channel.
Application DDEInitiate Method
Opens a DDE channel to an application.
Application DDERequest Method
Requests information from the specified application. This method always returns an array.
Application DDETerminate Method
Closes a channel to another application.
Application DisplayXMLSourcePane Method
Opens the XML Source task pane and displays the XML map specified by the XmlMap argument.
Application DoubleClick Method
Equivalent to double-clicking the active cell.
Application Evaluate Method
Converts a Microsoft Excel name to an object or a value.
Application ExecuteExcel4Macro Method
Runs a Microsoft Excel 4.0 macro function and then returns the result of the function. The return type depends on the function.
Application GetCustomListContents Method
Returns a custom list (an array of strings).
Application GetCustomListNum Method
Returns the custom list number for an array of strings. You can use this method to match both built-in lists and custom-defined lists.
Application GetOpenFilename Method
Displays the standard Open dialog box and gets a file name from the user without actually opening any files.
Application GetPhonetic Method
Returns the Japanese phonetic text of the specified text string. This method is available to you only if you have selected or installed Japanese language support for Microsoft Office.
Application GetSaveAsFilename Method
Displays the standard Save As dialog box and gets a file name from the user without actually saving any files.
Application Goto Method
Selects any range or Visual Basic procedure in any workbook, and activates that workbook if it’s not already active.
Application InchesToPoints Method
Converts a measurement from inches to points.
Application InputBox Method
Displays a dialog box for user input. Returns the information entered in the dialog box.
Application Intersect Method
Returns a Range object that represents the rectangular intersection of two or more ranges.
Application MacroOptions Method
Corresponds to options in the Macro Options dialog box. You can also use this method to display a user defined function (UDF) in a built-in or new category within the Insert Function dialog box.
Application MailLogoff Method
Closes a MAPI mail session established by Microsoft Excel.
Application MailLogon Method
Logs in to MAPI Mail or Microsoft Exchange and establishes a mail session. If Microsoft Mail isn't already running, you must use this method to establish a mail session before mail or document routing functions can be used.
Application NextLetter Method
You have requested Help for a Visual Basic keyword used only on the Macintosh. For information about this keyword, consult the language reference Help included with Microsoft Office Macintosh Edition.
Application OnKey Method
Runs a specified procedure when a particular key or key combination is pressed.
Application OnRepeat Method
Sets the Repeat menu item and the name of the procedure that will run if you choose the Repeat command (Edit menu) after running the procedure that sets this property.
Application OnTime Method
Schedules a procedure to be run at a specified time in the future (either at a specific time of day or after a specific amount of time has passed).
Application OnUndo Method
Sets the text of the Undo and the name of the procedure that’s run if you choose the Undo command (Edit menu) after running the procedure that sets this property.
Application RecordMacro Method
Records code if the macro recorder is on.
Application RegisterXLL Method
Loads an XLL code resource and automatically registers the functions and commands contained in the resource.
Application Run Method
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.
Application SendKeys Method
Sends keystrokes to the active application.
Application SharePointVersion Method
Returns the version number of SharePoint Foundation instances running at site for the specified URL.
Application Volatile Method
Marks a user-defined function as volatile. A volatile function must be recalculated whenever calculation occurs in any cells on the worksheet. A nonvolatile function is recalculated only when the input variables change. This method has no effect if it's not inside a user-defined function used to calculate a worksheet cell.
Application Wait Method
Pauses a running macro until a specified time. Returns True if the specified time has arrived.
Application Union Method
Purpose
This method returns the union of two or more ranges.
Syntax
Union(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)
Required Parameters
Arg1
At least two Range objects must be specified.
Arg2
At least two Range objects must be specified.
Optional Parameters
Arg3 - Arg 30
At least two Range objects must be specified.
Application SendKeys Method
Purpose
This method sends keystrokes to the active application.
Syntax
SendKeys(Keys, Wait)
Required Parameters
Keys
The key or key combination you want to send to the application, as text.
Optional Parameters
Wait
True to have Microsoft Excel wait for the keys to be processed before returning control to the macro. False (or omitted) to continue running the macro without waiting for the keys to be processed.
Application SaveWorkspace Method
Purpose
This method saves the current workspace.
Syntax
SaveWorkspace(Filename)
Optional Parameters
Filename
The saved file name.
Application RegisterXLL Method
Purpose
This method loads an XLL code resource and automatically registers the functions and commands contained in the resource.
Syntax
RegisterXLL(Filename)
Required Parameters
Filename
Specifies the name of the XLL to be loaded.
Application RecordMacro Method
Purpose
This method records code if the macro recorder is on.
Syntax
RecordMacro(BasicCode, XlmCode)
Optional Parameters
BasicCode
A string that specifies the Visual Basic code that will be recorded if the macro recorder is recording into a Visual Basic module. The string will be recorded on one line. If the string contains a carriage return (ASCII character 10, or Chr$(10) in code), it will be recorded on more than one line.
XlmCode
This argument is ignored.
Application OnUndo Method
Purpose
This method sets the text of the Undo and the name of the procedure that’s run if you choose the Undo command (Edit menu) after running the procedure that sets this property.
Syntax
OnUndo(Text, Procedure)
Required Parameters
Text
The text that appears with the Undo command (Edit menu).
Procedure
The name of the procedure that’s run when you choose the Undo command (Edit menu).
Application OnTime Method
Purpose
This method schedules a procedure to be run at a specified time in the future (either at a specific time of day or after a specific amount of time has passed).
Syntax
OnTime(EarliestTime, Procedure, LatestTime, Schedule)
Required Parameters
EarliestTime
The time when you want this procedure to be run.
Procedure
The name of the procedure to be run.
Optional Parameters
LatestTime
The latest time at which the procedure can be run. For example, if LatestTime is set to EarliestTime + 30 and Microsoft Excel is not in Ready, Copy, Cut, or Find mode at EarliestTime because another procedure is running, Microsoft Excel will wait 30 seconds for the first procedure to complete. If Microsoft Excel is not in Ready mode within 30 seconds, the procedure won’t be run. If this argument is omitted, Microsoft Excel will wait until the procedure can be run.
Schedule
True to schedule a new OnTime procedure. False to clear a previously set procedure. The default value is True.
Application OnRepeat Method
Purpose
This method sets the Repeat menu item and the name of the procedure that will run if you choose the Repeat command (Edit menu) after running the procedure that sets this property.
Syntax
OnRepeat(Text, Procedure)
Required Parameters
Text
The text that appears with the Repeat command (Edit menu).
Procedure
The name of the procedure that will be run when you choose the Repeat command (Edit menu).
Application OnKey Method
Purpose
This method runs a specified procedure when a particular key or key combination is pressed.
Syntax
OnKey(Key, Procedure)
Required Parameters
Key
A string indicating the key to be pressed.
Optional Parameters
Procedure
A string indicating the name of the procedure to be run. If Procedure is "" (empty text), nothing happens when Key is pressed. This form of OnKey changes the normal result of keystrokes in Microsoft Excel. If Procedure is omitted, Key reverts to its normal result in Microsoft Excel, and any special key assignments made with previous OnKey methods are cleared.