CreateGroup Method

       

Creates a new Group object (Microsoft Jet workspaces only).

Syntax

Set group = object.CreateGroup (name, pid)

The CreateGroup method syntax has these parts.

Part

Description

group

An object variable that represents the Group you want to create.

object

An object variable that represents the User or Workspace object for which you want to create the new Group object.

name

Optional. A Variant (String subtype) that uniquely names the new Group object. See the Name property for details on valid Group names.

pid

Optional. A Variant (String subtype) containing the PID of a group account. The identifier must contain from 4 to 20 alphanumeric characters. See the PID property for more information on valid personal identifiers.

 

Remarks

You can use the CreateGroup method to create a new Group object for a User or Workspace. If you omit one or both of the optional parts when you use CreateGroup, you can use an appropriate assignment statement to set or reset the corresponding property before you append the new object to a collection. After you append the object, you can alter some but not all of its property settings. See the individual property topics for more details.

If name refers to an object that is already a member of the collection, a run-time error occurs when you use the Append method.

To remove a Group object from a collection, use the Delete method on the Groups collection.