D
draco664
Greetings all,
I've been asked to write a macro that will collate certain information
from various fields (custom defined and normal) from our projects for
statistical analysis.
Things like, sum of all values in Number5, the median average of all
values in Actual Cost, a list of all the different values in Text2,
that sort of thing.
Scope creep however is a problem. Every time I present the results, I
get told that it's great, but could I add another thing please?
Currently, I'm using arrays of type string or long or date to gather
and manipulate this data, but every time I get anothe request, I have
to add another array, and the macro's declaration section is beginning
to approach novella length.
I tried to use an array of type 'Task', thinking that I could use the
one array to store all this data (not to mention not having to create
new arrays all the time, just use new properties of the same data
type.
The problem is that I can't work out how to initialise the new array
of Tasks. I was getting error 91 (object variable not set), but there
was no information in help about how to set a variable of type 'Task'.
The one thing in help that was, well, helpful was a line that said
that 'you must assign a valid reference to the object variable using
the Set statement'. However, I can't find anything that shows how to
use the Set statement on a variable of type 'Task'.
Any suggestions?
Thanks in advance,
Chris
I've been asked to write a macro that will collate certain information
from various fields (custom defined and normal) from our projects for
statistical analysis.
Things like, sum of all values in Number5, the median average of all
values in Actual Cost, a list of all the different values in Text2,
that sort of thing.
Scope creep however is a problem. Every time I present the results, I
get told that it's great, but could I add another thing please?
Currently, I'm using arrays of type string or long or date to gather
and manipulate this data, but every time I get anothe request, I have
to add another array, and the macro's declaration section is beginning
to approach novella length.
I tried to use an array of type 'Task', thinking that I could use the
one array to store all this data (not to mention not having to create
new arrays all the time, just use new properties of the same data
type.
The problem is that I can't work out how to initialise the new array
of Tasks. I was getting error 91 (object variable not set), but there
was no information in help about how to set a variable of type 'Task'.
The one thing in help that was, well, helpful was a line that said
that 'you must assign a valid reference to the object variable using
the Set statement'. However, I can't find anything that shows how to
use the Set statement on a variable of type 'Task'.
Any suggestions?
Thanks in advance,
Chris