Default property (Microsoft Forms)
Designates the default command button on a form.
Syntax
object.Default [= Boolean ]
The Default property syntax has these parts:
Part | Description |
---|---|
object | Required. A valid object. |
Boolean | Optional. Whether the command button is the default. |
Settings
The settings for Boolean are:
Value | Description |
---|---|
True | The CommandButton is the default button. |
False | The CommandButton is not the default button (default). |
Remarks
A CommandButton or an object that acts like a command button can be designated as the default command button. Only one object on a form can be the default command button. Setting the Default property to True for one object automatically sets it to False for all other objects on the form.
To choose the default command button on an active form, the user can click the button, or press ENTER when no other CommandButton has the focus. Pressing ENTER when no other CommandButton has the focus also initiates the KeyUp event for the default command button.
Default is provided for OLE container controls (Windows only) that specifically act like CommandButton controls.
Tip
You should consider making the Cancel button the default button for forms that support operations that can't be undone (such as delete). To do this, set both Default and the Cancel property to True.
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기