-1

I have an MS Project document that was set up by someone else, previously the schedule would change the cell colour based on if a cell had been modified in the last week. but this has stopped working. ive exhausted my knowledge trying to fix this without using VBA so now I need to start learning more about VBA.

Basically what i would like to do is

If cell last modified date <7 days set colour Yellow
if cell last modified date >7 days set colour White

and ideally this would only work on a set range of cells.

I know that this is not the level of detail that most questions here have and im basically brand new to VBA, but its never too late to learn right?

For a little background the last programming i have done was 20 years ago in university when I took a basic C++ course

Sparrow
  • 7
  • 1
  • 2
    *Welcome to [so]!* This is a site where programmers *write their own code* and share a ***specific* problem** after trying to solve it on their own. Be sure to check out the [tour] (you'll earn your 1st badge!) and see "[ask]", and also the [help/on-topic] for more information about what's on topic on this site. This basic usage question may be better suited to https://superuser.com/ although I'm positive you'll also find a lot of information by entering your question into Google. Here's some [tips](//codeblog.jonskeet.uk/stack-overflow-question-checklist/) from the site's top user. Good Luck! – ashleedawg Mar 25 '19 at 13:49
  • @Sparrow, it sounds like Change Highlighting got turned off. See this post for info: [https://blog.epmainc.com/disable-change-highlighting-microsoft-project-2010-and-2013/](https://blog.epmainc.com/disable-change-highlighting-microsoft-project-2010-and-2013/) – Rachel Hettinger Mar 25 '19 at 16:04
  • @Sparrow, BTW **if** you wanted to roll your own code to do this, be aware that you can only track changes at the **task** level, and not a particular cell, and that the coding would require creating a class module to use events at the application level ([example](https://social.msdn.microsoft.com/Forums/en-US/0608873a-da26-4895-a3b3-860e829968e0/ms-project-to-detect-task-level-changes-and-record-a-date-modified-in-custom-field?forum=project2010custprog)). So yes, you can do something similar with VBA, but not cell-highlighting. – Rachel Hettinger Mar 25 '19 at 16:16
  • Hi Rachel, thanks for the help, I do have Change highlighting turned on, but the problem is as soon as i save the document the highlighting goes away. we have multiple people edit this field and we meet once a week to review changes. Basically i want the change highlighting to stick around for a week before going back to normal. if i could do that in VBA or through a setting i dont know about then i would be good. – Sparrow Mar 26 '19 at 15:09

1 Answers1

0

Im sorry to tell you that what you are asking is not exactly IMPOSSIBLE but the amount of code you would need to write to make it happen would be HUGE. Cell highlighting just tracks the LAST set of changes. There is not really a 'date rage' capability built in.

To do this would require a LOT of event code and storing stuff in custom fields and would slow application performance to a literal crawl. Also, since SO many cells across tasks are linked because of predecessor\successor links you could make a change and then it could change literally every task in the project. It would be a nightmare.

What business problem are you trying to solve with this?