Propriedade CheckBox.GroupName (Script do Outlook Forms)

Returns or sets a String that identifies a group of mutually exclusive CheckBox controls. Leitura/gravação.

Sintaxe

expressão. Groupname

Expressão Uma variável que representa um objeto CheckBox .

Comentários

Use the same GroupName for all check boxes in the group. The default setting is an empty string.

To create a group of mutually exclusive CheckBox controls, you can put the check boxes in a Frame on your form, or you can use the GroupName property. GroupName is more efficient for the following reasons:

  • Você não precisa incluir um Quadro para cada grupo. By not using a Frame, you reduce the number of controls on the form, and in turn, improve performance and reduce the size of the form.

  • You have more design flexibility. If you use a Frame to create the group, all the check boxes must be inside the Frame. If you want more than one group, you must have one Frame for each group. However, if you use GroupName to create the group, the group can include check boxes anywhere on the form. If you want more than one group, specify a unique name for each group; you can still place the individual controls anywhere on the form.

  • You can create check boxes with transparent backgrounds, which can improve the visual appearance of your form. The Frame is not a transparent control.

Regardless of which method you use to create the group of check boxes, clicking one check box in a group sets all other check boxes in the same group to False. All check boxes with the same GroupName within a single container are mutually exclusive. Use o mesmo nome de grupo em dois contêineres, mas isso cria dois grupos (um em cada contêiner) em vez de um grupo que inclui ambos os contêineres.

For example, assume your form includes some check boxes and a MultiPage that also includes option buttons. The check boxes on the MultiPage are one group and the buttons on the form are another group. Os dois grupos não se afetam. Changing the setting of a check box on the MultiPage does not affect the check boxes on the form.

Suporte e comentários

Tem dúvidas ou quer enviar comentários sobre o VBA para Office ou sobre esta documentação? Confira Suporte e comentários sobre o VBA para Office a fim de obter orientação sobre as maneiras pelas quais você pode receber suporte e fornecer comentários.