# EsbRenameUser

Description

EsbRenameUser() renames an existing user.

Syntax

    EsbRenameUser (hCtx, UserName, nUserName)

    ByVal hCtx      As Long
    ByVal UserName  As String
    ByVal nUserName As String

Parameters

hCtx | Essbase VB API context handle.
UserName | Old name of an existing user to rename.
nUserName | New name for the renamed user.

Return Value

None.

Notes

- The specified new user 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 EsbRenameUser Lib "ESBAPIW" (ByVal hCtx As Long, ByVal OldName As String, ByVal NewName As String) As Long

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

       OldName = "Joseph"
       NewName = "Joe"

       '************
       ' Rename user
       '************
       sts = EsbRenameUser (hCtx, OldName, NewName)
    End Sub

See Also

EsbCreateUser()
EsbDeleteUser()
EsbListUsers()