_Application.RecordMacro(Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應