N
Newbie
We have written the simple VBA codes to change the color of the text.
However, when I executed with Macros, I received an error.
"Run time error '1100'
The Method is not available in this situation"
Background -> We downloaded the file and associated that field,
"Type"
with the "Text10" in Microsoft Project Professional 2007. There are
values in the "Type" field, which are "Management" and "Employee". We
would like to differentiate the colors.
(We have already used "Marked tasks".)
The codes that we wrote were:
-------------------
Public Sub Change_Color()
Dim tskT As Task
For Each tskT In ActiveProject.Tasks
Select Case tskT.Text10
Case "Management"
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjRed
Case "Employee"
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjBlue
End Select
Next tskT
End Sub
------------------------
When we debugged this macros, it highlighted the line that has the
font color. We changed the number to 1 or 2, it still did not work.
Requests:
1. Can anyone assist in correcting this code?
2. In order to enhance, how can I add the background color? Will the
back color command work?
I do appreciate your response. I thought that we have almost nailed
this down. Thanks.
However, when I executed with Macros, I received an error.
"Run time error '1100'
The Method is not available in this situation"
Background -> We downloaded the file and associated that field,
"Type"
with the "Text10" in Microsoft Project Professional 2007. There are
values in the "Type" field, which are "Management" and "Employee". We
would like to differentiate the colors.
(We have already used "Marked tasks".)
The codes that we wrote were:
-------------------
Public Sub Change_Color()
Dim tskT As Task
For Each tskT In ActiveProject.Tasks
Select Case tskT.Text10
Case "Management"
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjRed
Case "Employee"
SelectRow Row:=tskT.ID, RowRelative:=False
Font Color:=pjBlue
End Select
Next tskT
End Sub
------------------------
When we debugged this macros, it highlighted the line that has the
font color. We changed the number to 1 or 2, it still did not work.
Requests:
1. Can anyone assist in correcting this code?
2. In order to enhance, how can I add the background color? Will the
back color command work?
I do appreciate your response. I thought that we have almost nailed
this down. Thanks.