Examples: IntercompanyID property

The following example retrieves and displays the intercompany ID for the company the user is currently logged into.

Private Sub IntercompanyID_Click()
	Dim UserInfoObj As UserInfo
	Dim IntercompanyID As String

	'Get the UserInfo object
	Set UserInfoObj = VbaGlobal.UserInfoGet()

	'Retrieve and display the intercompany ID
	IntercompanyID = UserInfoObj.IntercompanyID
	MsgBox IntercompanyID
End Sub

Documentation Feedback