The following example retrieves and displays the name of the user currently logged into Microsoft Dynamics GP.
Private Sub UserName_Click() Dim UserInfoObj As UserInfo Dim UserName As String 'Get the UserInfo object Set UserInfoObj = VbaGlobal.UserInfoGet() 'Retrieve and display the user name UserName = UserInfoObj.UserName MsgBox UserName End Sub