cankillo.blogg.se

Change cell background color word
Change cell background color word








change cell background color word

It has a macro I wrote that uses arrays for storing and retrieving data: If you are not familiar with using arrays, you can check out this Wiki article. When the formatting is all complete, use the stored view structure array to go back and collapse summary lines as necessary. Change highlighting should be independent of setting theĥ. Note, in the quick test that I did, I don't see a need to mess with checking the change highlighting. Once the view structure is stored, go ahead and expand the whole file and do the formatting. Note, this gets more complex is you have summary lines at multiple outline levels.Ĥ. Track of which summary lines are expanded and which are collapsed in an array. If the ID is not sequential, you can assume that summary line is collapsed. If the ID is sequential you can assume that summary line is expanded. Keep track of the ID of each summary line and compare it with the ID of the next task. Step through the ActiveSelection.Tasks looking for summary lines.ģ. In pseudo-code, this is how I would approach it.Ģ. "memorize" the current view structure, do the formatting, and then restore the memorized view). Okay, so how do you do what you want? Well, you will have to do your option 2 (i.e. Whether that has changed in Project 16, I do not know, but I kind of doubt it. Font/field cell formatting in Project has always required the use of foreground processing in VBA (i.e. operating onĮxcel objects independent of what is shown in the visible screen view), but Project has always been lagging behind in that functionality. With Excel, much if not all, formatting of cells can be done while using background processing in VBA (i.e. I don't see that the ScreenUpdating will have any effect on what you are trying to do, so I'd eliminate those lines.Īs I mentioned in my response to your other post, Project is less versatile than Excel when it comes to setting font characteristics.

change cell background color word

SelectTaskField Row:="1", Column:="Number10", RowRelative:=False SelectTaskField Row:=tsk.ID, Column:="Number10", RowRelative:=False (The routine toggles the "Change Highlighting" because otherwise that will override the highlighting that the routine makes).ġ) address the field by task instead of rowĢ) recognize which tasks are closed, memorize those, then re-open themĪny suggestions on this would be appreciated That changes the display of tasks that are closed. To make this work I have to do "OutlineShowAllTasks", so that the Row number willĬorrelate with the Task ID. The problem is that this routine loops through tasks and then uses "SelectTaskField Row:= taskID" to get to the field/cell that I want to modify.

change cell background color word

The routine below loops through all rows in the Project and, based on the number in one custom field, changes the background color of that cell.










Change cell background color word