Setting up MS Project Text Forecolor

Posted on 2005-04-22
Last Modified: 2006-11-18
Hi ,

I would like to set up font and color for every row or task on MS Project using VB.
MS Project allows to set up font and color only if we select the required row, which I am trying to using VB code.

My problem is when  I use .SelectRow method and specify dynamic row number, it does not select specified row but it goes way to below specified row.

Can somebody help me on this?

Question by:amiteshsinha
    LVL 23

    Expert Comment

    Do you explicitly specify False for the second parm?

    If not, the selection is relative to the active current row.

    Author Comment

    Thanks a lot for your reply.

    You are right, I have specified "True" for seconf parameter. But still it skips few rows below.
    Here i sthe parameter list for .SELECTROW method.

    SelectRow(Row, RowRelative, Height, Extend, Add)

    For first parameter "ROW" , I am specifying a dynamic variable, which is "i".
    This is same as my TASK ID which helps me to sep up TASK Name. While entering TASK Name it does not skip any rows , it set text one after another line.

    For Second Parameter "RowRelative" , I am passing "TRUE" Value

    Here is the actual call for .SELECTROW method.

    projApp.SelectRow i, True, 0, False, False

    projapp is "Project Application Object"

    Do you think anything going wrong here.

    Thanks in advance.

    LVL 23

    Accepted Solution

    If you want to go to row 'i', set the second parameter to false.

    Author Comment

    Thanks for your reply.
    It is working. Great help, tried many ways to fix this but never thought this way.
    Thanks a lot.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Suggested Solutions

    Title # Comments Views Activity
    countEvens challenge 2 47
    abstract class with all non abstract mentods 6 58
    Problem to setup 18 66
    scoresClump  challenge 31 85
    This article will show, step by step, how to integrate R code into a R Sweave document
    Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now