Using the below VB in Microsoft Project 98, when I reach the line "For each A ---, I receive the following error message "Object variable or With block variable not set".
Sub ResourceNames()
Dim A As Assignment
For Each A In activecell.Task.Assignments
MsgBox A.ResourceName
Next A
End Sub
Also the below code gives an eror message "Object required"
Sub SelectedTasks()
Dim T As Task
If Not (activeselection.Tasks Is Nothing) Then
For Each T In activeselection.Tasks
MsgBox T.Name
Next T
End If
End Sub
I would appreciate some advise to solve the above problems.
kevsim
Sub ResourceNames()
Dim A As Assignment
For Each A In activecell.Task.Assignments
MsgBox A.ResourceName
Next A
End Sub
Also the below code gives an eror message "Object required"
Sub SelectedTasks()
Dim T As Task
If Not (activeselection.Tasks Is Nothing) Then
For Each T In activeselection.Tasks
MsgBox T.Name
Next T
End If
End Sub
I would appreciate some advise to solve the above problems.
kevsim