Newbie Error

R

Robert

At Line 109, what causes the error message:
Run-time error '438':
Object doesn't support this property or method

and what do I need to learn to have been able to identify the error?

1 Option Explicit
2 Dim strFanType As String
3 Dim boolSum As Boolean
4 Dim gboolboolCrit As Boolean
5 Dim T, TT, Tselect As Task
..
..
..
100 'Walks through all predecessors to a task and marks their flag5 as true
101 Sub FanBackward(T As Task, boolCrit As Boolean)
102 Dim TT As Task
103 T.Flag5 = True
104 For Each TT In T.PredecessorTasks
105 If TT.Flag5 <> True Then
106 If Not boolCrit Then
107 FanBackward TT, boolCrit
108 End If
109 If boolCrit And TT.boolCritical Then
110 FanBackward TT, boolCrit
111 End If
112 End If
113 Next TT
114 End Sub
 
J

Jan De Messemaeker

Hi,

TT.boolcritical?
I do not know any property of a task called boolcritical
HTH
 
R

Robert

First, the line numbers are not in the code. I added them only to facilitate
the question.

Yes, this is "Chapter 2" from informit.com, but I can't identify the book
title or author. I found your exact reference below via a web search, but if
I start from informit.com, I can't find Chapter 2, the book or the author.

I'm a project manager, not a programmer, but I've gotten to the point that I
want to be able to tap the next dimension of MS Project. VBA books that are
presented in a MS PROJECT CONTEXT are difficult to find. Web articles and
blogs (e.g. zo-d.com) are great, but I'm trying to understand the basics at
this point. I've just started Rod Gills "VBA Programming for Microsoft
Office Project," but I haven't found anything by you yet. Please let me
know. I'd appreciate any additional suggestions as well.

Finally, I'm still trying to learn how to "read" - but apparently not very
well. After several times through Chapter 2! In the macro, I don't fine
anywhere boolCritical is set or even Dimensioned, nor even any reference to
the Critical field. I'm setting Flag5 so I'm getting that far. What am I
missing?

Thaks in advance,
Robert
 
R

Robert

OK, I get it... it should be TT.Critical, not bool anything!

Jack - Is "Chapter 2" from a book by you? If so, can you let us know the
title?
 
J

Jack Dahlgren

I believe that it is a chapter from Tim Pyron's Que Special Edition - Using
Microsoft Project 2002 which I wrote the VBA chapter for. The book became
too fat so they put a few chapters on-line (I think the project server
chapter and maybe another one or two were out there too.)

You can find more stuff I've written here:
http://zo-d.com/blog/archives/programming.html

And on the MVP website there are links to training material that Microsoft
has put on line. I can't recall the exact URL, but poke around on
http://project.mvps.org
and you'll find a few interesting things. The best starting point is
actually the Project 98 VBA training.

As for boolCritical, I think there is an error in the text. Someone
apparently did a crude search and replace and where there should be the word
"Critical" there is instead the word "boolCritical". I'm pretty sure this
must have happened somewhere during the editing process as the code worked
when I turned it in. I certainly am opposed to naming variables things like
"gboolboolCrit" :)

I have a working example of the code on my other website which is probably a
better starting point for you. Look for the trace macro here:
http://masamiki.com/project/macros.htm

-Jack Dahlgren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top