I am writing some VB code to do some checking in my project file. I am
familiar how to reference cells in EXCEL but don't seem to be able to find
the right code to do the same in project. I want to reference a particular
location by row and column. In EXCEL for example you would use : Cells(2,6).
What do you use in project?

Thanks

Re: How to reference a cell by row, column in VB in project by Jan

Jan
Thu Apr 21 06:04:48 CDT 2005

Hi Walter,

Generally, in Project, you don't address cells.
You address properties of Tasks/Resources.You could f.i. use

Dim Job as task
set job=activeproject.tasks(Thenumberofthetask)

then address any property of the task f.i.
Job.percentcomplete=50

Which makes your code independent of filter, sorts, inserted columns,
etcetera

If you insist to use the location of a cell in a view, you can use the
selectcell method
selectcel(row, column, rowrelative)
Then use the ActiveCell or the ActiveSelection object

But to use its contents I will still recommend to use
activeselection.tasks(1).....
Hope this helps,
--
Jan De Messemaeker
Microsoft Project Most Valuable Professional
http://users.online.be/prom-ade/
+32-495-300 620
"Walter L. skinner" <Walter L. skinner@discussions.microsoft.com> schreef in
bericht news:AB7872E4-A858-40CE-9E3E-DE64BBCAA4FE@microsoft.com...
> I am writing some VB code to do some checking in my project file. I am
> familiar how to reference cells in EXCEL but don't seem to be able to find
> the right code to do the same in project. I want to reference a particular
> location by row and column. In EXCEL for example you would use :
Cells(2,6).
> What do you use in project?
>
> Thanks