In earlier versions of Microsoft Dynamics GP, one of the following files is used to retrieve the username of the user and the password of the user who is currently logged into Microsoft Dynamics GP:

  • The RetrieveGlobals.dll file

  • The RetrieveGlobals9.dll file

The RetrieveGlobals.dll and RetrieveGlobals9.dll files create a connection string in Microsoft Visual Basic for Applications (VBA) code. This connection string does not require the user to hard code the username and password.

More Information

In Microsoft Dynamics GP 10.0, new connection objects were added to the VBA code. These new connection objects replace the RetrieveGlobals.dll and RetrieveGlobals9.dll files in Microsoft Dynamics GP. This new VBA code lets you create an active connection based off the username and password of the user who is currently logged into Microsoft Dynamics GP. This new connection object is named UserInfoGet. This UserInfoGet connection object enables you to use the following properties and methods:

  • The CompanyName property

  • The CreateADOConnection method

  • The IntercompanyID property

  • The UserDate property

  • The UserID property

  • The UserName property

The following is a sample of code of the new UserInfoGet connection object.

Dim cn As New ADODB.connection
Dim rst As New ADODB.recordset
Dim cmd As New ADODB.Command

Private Sub PushButtonM79_AfterUserChanged()
cmd.CommandText = "Select * from RM00101"
Set rst = cmd.Execute
MsgBox (rst!custnmbr)
End Sub

Private Sub Window_AfterOpen()
Set cn = UserInfoGet.CreateADOConnection
cn.DefaultDatabase = UserInfoGet.IntercompanyID
cmd.ActiveConnection = cn
End Sub


For more information about the RetrieveGlobals.dll and RetrieveGlobals9.dll files, click the following article number to view the article in the Microsoft Knowledge Base:

913341 How to use the new RetrieveGlobals9.dll file in Integration Manager and in Microsoft Dynamics GP 9.0

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!