title | keywords | f1_keywords | ms.service | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|---|
Application.AddResourcesFromProjectServer method (Project) |
vbapj.chm2130 |
|
project-server |
|
74fe4224-0019-5daa-11ae-3bdd6f2f5abb |
06/08/2017 |
medium |
Opens the Build Team dialog box if you are connected to Project Server and are currently in a resource view.
expression. AddResourcesFromProjectServer
expression A variable that represents an Application object.
Boolean
The AddResourcesFromProjectServer method is only available in resource views and returns a trappable error (error code 1100) when applied in a non-resource view.
The following example displays the Build Team from Project Server dialog box. First, Project adds the URL specified in Collaboration Options (Collaborate menu) to Microsoft Internet Explorer's list of trusted sites. Upon confirmation, Project switches to a Resource Sheet view and displays the Build Team from Project Server dialog box, if connected to My Computer in workgroup mode. Project displays the Build Team from Project Name dialog box when connected to Project Server.
Sub AddResources()
If Projects.Count = 0 Then
MsgBox "You must have at least one active project open."
Exit Sub
End If
If ActiveProject.ServerURL = "" Then
MsgBox "A Project Server URL has not been " _
& "specified." & Chr(13) & "Click OK to select " _
& "'Collaborate Using Project Server' and " _
& "specify a valid URL in the Options dialog box " _
& "(Tools menu)."
Application.OptionsWorkgroup
Else
ActiveProject.MakeServerURLTrusted
ViewApply Name:="Resource Sheet"
Application.AddResourcesFromProjectServer
End If
End Sub
[!includeSupport and feedback]