Hi,
The event is happening before the project is fully open. Note that the
syntax of the open event is:
Private Sub Project_Open(ByVal pj As MSProject.Project)
pj refers to the project being opened, so you don't need activeproject.
pj.Tasks(2) will still point to task with ID=2.
You can't select cells but you can mark them. Use: pj.Tasks(2).Marked = True
Then in Project once the file is open, select Format, Text Styles. Select
Marked from the drop down list and enter a format. This will only be for the
text, not background, but it does work.
Now all changes are automatically flagged just by setting a task to marked.
You can have a close event that clears all Marked flags to false.
--
Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit
www.projectlearning.com/