Edit

Share via


_Application.RecordMacro(Object, Object) Method

Definition

Records code if the macro recorder is on.

public void RecordMacro (object BasicCode, object XlmCode);
Public Sub RecordMacro (Optional BasicCode As Object, Optional XlmCode As Object)

Parameters

BasicCode
Object

Optional Object. 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
Object

Optional Object. This argument is ignored.

Remarks

The RecordMacro method cannot record into the active module (the module in which the RecordMacro method exists).

To prevent recording (for example, if the user cancels your dialog box), call this function with two empty strings.

Applies to