# EsbRenameGroup

Description

EsbRenameGroup() renames an existing group.

Syntax

    EsbRenameGroup (hCtx, GrpName, nGrpName)

    ByVal hCtx     As Long
    ByVal GrpName  As String
    ByVal nGrpName As String

Parameters

hCtx | Essbase VB API context handle.
GrpName | Old name of an existing group to rename.
nGrpName | New name for the renamed group. Group names can be up to 30 characters long.

Return Value

None.

Notes

- The specified new group name must not already exist.

Access

This function requires the caller to have Create/Delete User privilege (ESB_PRIV_USERCREATE) for the logged in server.

Example

    Declare Function EsbRenameGroup Lib "ESBAPIW" (ByVal hCtx As Long, ByVal GroupName As String, ByVal nGrpName As String) As Long

    Sub ESB_RenameGroup ()
       Dim sts As Long
       Dim OldName As String
       Dim NewName As String

       OldName = "PowerUsers"
       NewName = "NewUsers"

       '*************
       ' Rename Group
       '*************
       sts = EsbRenameGroup (hCtx, OldName, NewName)
    End Sub

See Also

EsbCreateGroup()
EsbDeleteGroup()
EsbListGroups()