<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Project</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/" />
<modified>2008-04-02T00:26:50Z</modified>
<tagline>Project Management, Software, Training...</tagline>
<id>tag:Zo-d.com,2008:/blog//2</id>
<generator url="http://www.movabletype.org/" version="3.34">Movable Type</generator>
<copyright>Copyright (c) 2008, 
Jack</copyright>

<entry>
<title>Analyze Microsoft Project Resource Usage Data In Excel</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/programming/analyze-microsoft-project-resource-usage-data-in-excel.html" />
<modified>2008-04-02T00:26:50Z</modified>
<issued>2008-04-01T09:01:01Z</issued>
<id>tag:Zo-d.com,2008:/blog//2.541</id>
<created>2008-04-01T09:01:01Z</created>
<summary type="text/plain">The &quot;Analyze Timescaled Data In Excel&quot; add-in which ships with Microsoft Project has a couple of limitations, the first is that it is not easy to find, and the second is that it is task-based only, so if you want...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Programming</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<p>The "Analyze Timescaled Data In Excel" add-in which ships with Microsoft Project has a couple of limitations, the first is that it is not easy to find, and the second is that it is task-based only, so if you want to export resource data you are out of luck. In this post I'll show how to write your own code to export resource timescaled data and use what you have learned to export almost any sort of timescaled data you can think of.</p>

<p><strong>What is Timescaled Data?</strong><br>
Project is different from other applications like Excel because it has a dimension of time. Tasks have values for work and cost, but also contain the time dimension in the form of duration.  On a specific task, the amount of work or cost may vary during the task instead of being spread evenly across the task. Because of this users sometimes need to view this information by day or week or hours. Within project they do this using the task usage view or the resource usage view and setting the timescale the way they want to see it. But sometimes they want this data outside of project and when they try and cut and paste, they find that it is not a simple matter. The view can not simply be copied and pasted. So to do this you need help from VBA.</p>

<p><strong>Using VBA to Export Data</strong><br>
Underneath the surface of project is a powerful programming language called Visual Basic for Applications (VBA). It can be used to do just about everything that you can do manually in Microsoft Project but it can also do things which would be quite tedious or difficult to do manually. This example presumes you know have some understanding of VBA and if you don't I suggest you read the articles I've posted here (link to programming archive). VBA can open and operate other Microsoft Office applications. In this case we will open Excel and write data into it.</p>

<p><strong>The TimeScaleData Method and the TimeScaleValues Collection</strong><br>
The TimeScaleData method is used to get a collection of timescaled values from tasks, assignments or resources which you can iterate through or read. The syntax for TimeScaleData method is a bit complex so it needs some explanation before we get into writing our code.</p>

<p><The basic syntax for TimeScaleData is as follows:<br>
<em>expression</em><code>.TimeScaleData(StartDate, EndDate, Type, TimeScaleUnit, Count)</code> </p>

<p>Where <em>expression</em> is one of the following:<br>
An Assignment or Assignments Collection, A Resource or Resources Collection, A Task or Tasks Collection.</p>

<p><The parameters for the method are pretty simple, but there are some twists.</p>

<p><code>StartDate</code> is the start date for the data. The twist here is that if the date you provide falls within an interval you are requesting, the <code>StartDate</code> is rounded to the start of that interval. For example if you are using TimeScaleUnits of months and enter a date in the middle of the month, <code>StartDate</code> will "round down" to the start of the first day of the month. </p>

<p><code>FinishDate</code> is the finish date for the data. Like <code>StartDate</code> it rounds, but in this case to the end of the time interval you are using.</p>

<p><code>Type</code> is the type of data. If you leave out this parameter the default is to return work. Even if you want work  it is generally best to specify the type instead of leaving it blank. There is a long list of the defined types at the end of this article but to illustrate the type here are a few examples: </p><ul>
<li><code>pjAssignmentTimeScaledCumulativeCost
<li>pjTaskTimeScaledPercentComplete
<li>pjResourceTimeScaledWork</code>
</ul>
<p><code>TimeScaleUnit</code> is used to set the size of the time slice. By default weeks are used, but it is always good practice to set it explicitly. The possible values are:</p><ul><code><li>
pjTimescaleYears 
<li>pjTimescaleQuarters
<li>pjTimescaleMonths
<li>pjTimescaleWeeks
<li>pjTimescaleDays
<li>pjTimescaleHours
<li>pjTimescaleMinutes</code></ul>

<p><code>Count</code> is the final parameter. It controls how many timescale units are grouped together. Use it if you want to group the data by a timescale which is different than the ones available. For example if you wanted your data by half years, you could set <code>TimeScaleUnit</code> to <code>pjTimescaleMonths</code> and use a <code>Count</code> of 6.</p>

<p>The <code>TimeScaledData</code> method returns a <code>TimeScaleValues</code> collection. This is a collection which contains all of the timeslices and their values. We use the <code>TimeScaleData</code> method on an object and use the resulting <code>TimeScaleValues</code> as the source of our data.</p>

<p>Our Export form is built around this method. The key operation is:
<code>Set TSV = r.TimeScaleData(tbStart.Value, tbEnd.Value, TimescaleUnit:=cboxTSUnits.Value, 1)</code>
Now all we need to do is build a form which will supply the correct parameters and which will export the data to Excel.</p>

<p><strong>Using a Form in VBA</strong><br>
Many of the examples on this site or my other site (link to masamiki.com) don't ask the user for much information, but the <code>TimeScaleData</code> method has a number of parameters that must be supplied. And some of those parameters are selected from a list. Because of this we need to move from the simple input box to a form. A form can have a number of different controls on it. This example is kept very simple. It has <code>Start Date</code> and <code>End Date</code> text boxes.  <code>Units</code> and <code>Hours or FTE</code> combo boxes and a button which will run the code to export the data. A more fully developed version could have selections for Resource, Assignment or Task and could also have a list of all possible data types.</p>

<p>Here is the form I put together:</p>
<img alt="export-resource-data-to-excel.jpg" src="http://Zo-d.com/blog/images/export-resource-data-to-excel.jpg" width="243" height="257" />


<P>
Behind the form there are a number of subroutines. The first one runs when the form is first shown.</p>

<p><code>Private Sub UserForm_Initialize()<br>
'set the start date textbox value<br>
tbStart = ActiveProject.ProjectStart<br>
'set the end date textbox value<br>
tbEnd = ActiveProject.ProjectFinish<br>
'call a subroutine to set values for Units box<br>
fillTSUnitsBox<br>
'call a subroutine to set values for the hours or FTE box<br>
fillFTEBox<br>
End Sub</code></p>

<p>The routine to fill the Units box:</p>

<p><code>Sub fillTSUnitsBox()<br>
'sets Units constants<br>
Dim myArray(5, 2) As String<br>
myArray(0, 0) = "Days"<br>
myArray(0, 1) = pjTimescaleDays<br>
myArray(1, 0) = "Weeks"<br>
myArray(1, 1) = pjTimescaleWeeks<br>
myArray(2, 0) = "Months"<br>
myArray(2, 1) = pjTimescaleMonths<br>
myArray(3, 0) = "Quarters"<br>
myArray(3, 1) = pjTimescaleQuarters<br>
myArray(4, 0) = "Years"<br>
myArray(4, 1) = pjTimescaleYears<br>
<br>
cboxTSUnits.List = myArray<br>
'use weeks as default value<br>
cboxTSUnits.Value = 3<br>
End Sub</code></p>

<p>The routine to set the Hours/FTE box</p>

<p><code>Sub fillFTEBox()<br>
'sets choice of FTE or Hours<br>
cboxFTE.List = Array("Hours", "FTE")<br>
'sets to hours<br>
cboxFTE.Value = "Hours"<br>
End Sub</code></p>

<p>The code which runs when the button is clicked</p>
<p><code>Private Sub btnExport_Click()<br>
exportResourceUsage<br>
End Sub</code></p>

<p>And finally at the heart of it all the exportResourceUsage subroutine:</P>

<p><code>Sub exportResourceUsage()<br>
'first define our variables<br>
Dim r As Resource<br>
Dim rs As Resources<br>
Dim TSV As TimeScaleValues<br>
Dim pTSV As TimeScaleValues<br>
Dim i As Long, j As Long<br>
'define excel variables<br>
Dim xlRange As Excel.Range<br>
Dim xlCol As Excel.Range<br>
Dim xlRow As Excel.Range<br>
Dim xlApp As Excel.Application<br>
<br>
'open excel and set the cursor at the upper left cell<br>
Set xlApp = New Excel.Application<br>
xlApp.Visible = True<br>
AppActivate "Microsoft Excel"<br>
Set xlBook = xlApp.Workbooks.Add<br>
Set xlsheet = xlBook.Worksheets.Add<br>
xlsheet.Name = ActiveProject.Name<br>
Set xlRange = xlApp.ActiveSheet.Range("A1:A1")<br>
<br>
'start writing column headers<br>
xlRange.Value = "Resource Name"<br>
Set xlRange = xlRange.Offset(0, 1)<br>
xlRange.Value = "Generic"<br>
<br>
'use the dates from the project summary task TSV to set column headings
<br>
Set pTSV = ActiveProject.ProjectSummaryTask.TimeScaleData(tbStart.Value, tbEnd.Value, TimescaleUnit:=cboxTSUnits.Value)<br>
For j = 1 To pTSV.Count<br>
Set xlRange = xlRange.Offset(0, 1)<br>
xlRange.Value = pTSV.Item(j).StartDate<br>
Next j<br>
<br>
'go to first cell of next row<br>
Set xlRange = xlRange.Offset(1, -j)<br>
<br>
'loop through all resources and write out values<br>
Set rs = ActiveProject.Resources<br>
For Each r In rs<br>
If Not r Is Nothing Then<br>
xlRange.Value = r.Name<br>
Set xlRange = xlRange.Offset(0, 1)<br>
If r.EnterpriseGeneric Then<br>
xlRange.Value = r.EnterpriseGeneric<br>
End If<br>
<br>
Set xlRange = xlRange.Offset(0, 1)<br>
<br>
Set TSV = r.TimeScaleData(tbStart.Value, tbEnd.Value, TimescaleUnit:=cboxTSUnits.Value)<br>
'loop through all timescale data and write to cells<br>
For i = 1 To TSV.Count<br>
        If Not TSV(i).Value = "" Then<br>
        'convert to FTE if FTE is set<br>
        If cboxFTE.Value = "FTE" Then<br>
        Select Case cboxTSUnits.Value<br>
            Case 0 'years<br>
            xlRange.Value = TSV(i).Value / (60 * ActiveProject.HoursPerDay * ActiveProject.DaysPerMonth * 12)<br>
            <br>
            Case 1 'quarters<br>
            xlRange.Value = TSV(i).Value / (60 * ActiveProject.HoursPerDay * ActiveProject.DaysPerMonth * 3)<br>
            <br>
            Case 20 'months<br>
            xlRange.Value = TSV(i).Value / (60 * ActiveProject.HoursPerDay * ActiveProject.DaysPerMonth)<br>
            <br>
            Case 3 'weeks<br>
            xlRange.Value = TSV(i).Value / (60 * ActiveProject.HoursPerWeek)<br>
        <br>
            Case 4 'days<br>
            xlRange.Value = TSV(i).Value / (60 * ActiveProject.HoursPerDay)<br>
    <br>
        End Select<br>
        Else<br>
        'if not FTE, work hours are written<br>
        xlRange.Value = TSV(i).Value / (60)<br>
        End If<br>
        End If<br>
        Set xlRange = xlRange.Offset(0, 1)<br>
    Next i<br>
End If<br>
Set xlRange = xlRange.Offset(1, -(TSV.Count + 2))<br>
Next r<br>
<br>
'some minor excel formatting of results<br>
xlApp.Rows("1:1").Select<br>
xlApp.Selection.NumberFormat = "m/d/yy;@"<br>
xlApp.Cells.Select<br>
xlApp.Cells.EntireColumn.AutoFit<br>
xlApp.Activate<br>
End Sub</code></p>

<p>To keep this readable I've left out all error handling and the like. It is meant as an example of how to use the <code>TimeScaleData</CODE> method and read from the <code>TimeScaleValues</code> collection.</p>

<p>If you hadn't noticed, the code which runs when the button is clicked contains only one command. It is possible to put the whole <code>exportResourceUsage</code> subroutine code under the handler for that button, but by putting it in a separate subroutine, it is easier to reuse the subroutine and keep the code readable.</p>

<p>Now, we have the form and the code (rightclick here to save a copy of the form to your computer). The next step is getting the form to display. To do this we need to write a single line of code.</p>

<p><code>Sub showExportForm()<br>
exportResourceTimescaledData.Show<br>
End sub </code></p>

<p>This macro can then be assigned to a button on your toolbar. Clicking the button runs the macro which shows the form.</p>

<p><strong>The <code>TimeScaleData</code> Type Reference</strong><br>

There are a large range of <code>TimeScaleData</code> types available and which can be used to produce everything from Earned Value S-charts to cashflows or resource availability. The types possible depend on whether you are looking at Assignment, Resource or Task data. For example, Percent Complete is only available when looking at a task or task collection. WorkAvailability is only relevant to resources. </p>

<p>The constants to specify the <code>Type</code> always follow the same format, beginning with "pj" then the type of object you are referencing (Task, Resource or Assignment), then "Timescaled" and finally the data you are looking for.  For example you would use <code>pjTaskTimescaledDataActualCost</code> for actual cost for a task, but <code>pjResourceTimescaledDataActualCost</code> for costs of a specific resource.</p>

<p>The following are available for Tasks, Assignments, and Resources</p>
<p><ul>
<li>ActualCost
<li>ActualOvertimeWork
<li>ACWP (actual cost of work performed - use in Earned Value calculations)
<li>BaselineCost (and Baseline1-10 cost)
<li>BaselineWork (and Baseline1-10 work)
<li>BCWP (budgeted cost of work performed - used for Earned Value calculations)
<li>BCWS (budgeted cost of work scheduled - used for Earned Value calculations)
<li>Cost
<li>CumulativeCost
<li>CumulativeWork
<li>CV (cost variance - used in Earned Value)
<li>Overallocation
<li>OvertimeWork
<li>RegularWork
<li>SV (schedule variance - used in Earned Value)
<li>Work
</ul></p>

<p>The following are available for Assignments and Resources only:</p><p><ul>
<li>PeakUnits
<li>PercentAllocation</ul>

<p>The following are available for Resources only:</p><p><ul>
<li>RemainingAllocation
<li>UnitAvailability
<li>WorkAvailability
</ul>
<p>The following are available for Tasks only:</p><p><ul>
<li>ActualFixedCost
<li>CPI (cost performance index)
<li>CumulativePercentComplete
<li>CVP
<li>FixedCost
<li>PercentComplete
<li>SPI (schedule performance index)
<li>SVP</ul></p>


]]>

</content>
</entry>
<entry>
<title>Bay Bridge at Sunrise</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/architecture/bay-bridge-at-sunrise.html" />
<modified>2008-02-11T00:33:49Z</modified>
<issued>2008-02-11T00:22:30Z</issued>
<id>tag:Zo-d.com,2008:/blog//2.540</id>
<created>2008-02-11T00:22:30Z</created>
<summary type="text/plain"> Last week was too wet to go out, but this Sunday morning we managed to catch a view of the Bay Bridge just before sunrise. This is the East span of the Bay Bridge. This cantilevered section is being...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Architecture</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<img src="http://farm3.static.flickr.com/2073/2256273588_8bc94906a9.jpg?">
<p>Last week was too wet to go out, but this Sunday morning we managed to catch a view of the Bay Bridge just before sunrise. This is the East span of the Bay Bridge. This cantilevered section is being replaced by a new cable-stayed span which is supposed to be more earthquake resistant.</p>
<p>You can see two of the piers for the new span in the shot below:</p>
<img src="http://farm3.static.flickr.com/2357/2255508989_bb0854cae8.jpg">]]>

</content>
</entry>
<entry>
<title>NSFW - Business Poetry</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/literature/nsfw-business-poetry.html" />
<modified>2008-01-22T14:21:17Z</modified>
<issued>2008-01-22T14:08:34Z</issued>
<id>tag:Zo-d.com,2008:/blog//2.539</id>
<created>2008-01-22T14:08:34Z</created>
<summary type="text/plain">With a global stock meltdown on the rise, it seems a good time to launch my new occasional series of business poetry. Sorry, no rhymes or limericks today, but send them in and I&apos;ll publish it in the next round....</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Literature</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<p>With a global stock meltdown on the rise, it seems a good time to launch my new occasional series of business poetry. Sorry, no rhymes or limericks today, but send them in and I'll publish it in the next round.</p>

<p>Deadwood<br />
<em>They are cutting the tall old trees<br />
and the creatures in the underbrush <br />
run searching for a home</em></p>

<p><br />
Calling an All Hands<em><br />
The leader claims <br />
turning a battleship<br />
in the open sea<br />
requires 10.8 miles<br />
It must suck to be a battleship<br />
</em><br />
Procrustes<em><br />
And tell me again<br />
about your problem?<br />
Old Procrustes asks.<br />
I think we have<br />
the solution.</em></p>]]>

</content>
</entry>
<entry>
<title>Shortest day of the year - Winter Solstice</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/general/shortest-day-of-the-year-winter-solstice.html" />
<modified>2007-12-22T00:46:24Z</modified>
<issued>2007-12-21T19:33:32Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.538</id>
<created>2007-12-21T19:33:32Z</created>
<summary type="text/plain">Today is the shortest day of the year and for many cultures there is a celebration around this time, all springing from the fact that the light of the sun is returning to the world....</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>General</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<p>Today is the shortest day of the year and for many cultures there is a celebration around this time, all springing from the fact that the light of the sun is returning to the world. </p>]]>

</content>
</entry>
<entry>
<title>Download Microsoft Office Project Server 2007 Service Pack 1 (SP1)</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/project-2007/download-microsoft-office-project-server-2007-service-pack-1-sp1.html" />
<modified>2007-12-11T17:50:08Z</modified>
<issued>2007-12-11T17:33:46Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.537</id>
<created>2007-12-11T17:33:46Z</created>
<summary type="text/plain">Microsoft has released Service Pack 1 for the Microsoft Office 2007 Suite. Download it here: http://www.microsoft.com/downloads/details.aspx?FamilyId=9EC51594-992C-4165-A997-25DA01F388F5&amp;displaylang=en The fixes cover a bunch of different applications and platforms, so it will take some consideration in rolling it out. Good luck!...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Project 2007</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<p>Microsoft has released Service Pack 1 for the Microsoft Office 2007 Suite.<br />
Download it here:<br />
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9EC51594-992C-4165-A997-25DA01F388F5&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=9EC51594-992C-4165-A997-25DA01F388F5&displaylang=en</a><br />
The fixes cover a bunch of different applications and platforms, so it will take some consideration in rolling it out.</p>

<p>Good luck!<br />
</p>]]>

</content>
</entry>
<entry>
<title>Microsoft Project Server 2007 Service Pack 1 Release Date</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/project-2007/microsoft-project-server-2007-service-pack-1-release-date.html" />
<modified>2007-12-08T17:25:27Z</modified>
<issued>2007-12-08T17:10:42Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.536</id>
<created>2007-12-08T17:10:42Z</created>
<summary type="text/plain">How the tables have turned. At the Seattle Project Conference, Microsoft hemmed and hawed about the release of Service Pack 1 mumbling about March and April. At the Madrid Project Conference word is that they came out and stated it...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Project 2007</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<p>How the tables have turned. At the Seattle Project Conference, Microsoft hemmed and hawed about the release of Service Pack 1 mumbling about March and April. At the Madrid Project Conference word is that they came out and stated it will be December 11... this year. One can only hope that this was hastened by the questions posed at the Seattle conference, but in any case it is good news for those who are suffering.</p> 

<p>The snarky among us would say, <em>"Install immediately, it CAN'T be any worse!"</em> but I say, get those test cases ready. </p>
]]>

</content>
</entry>
<entry>
<title>Microsoft Project VBA - the Instr function</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/programming/microsoft-project-vba-the-instr-function.html" />
<modified>2007-12-08T17:09:21Z</modified>
<issued>2007-12-08T16:33:03Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.535</id>
<created>2007-12-08T16:33:03Z</created>
<summary type="text/plain">The Instr function is used to find out if one set of characters (string) is contained in another. It can be used in VBA macros (in Word, Excel, Project etc.) and also in Microsoft Project and Microsoft Project Server Custom...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Programming</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<p>The <code>Instr</code> function is used to find out if one set of characters (string) is contained in another. It can be used in VBA macros (in Word, Excel, Project etc.) and also in Microsoft Project and Microsoft Project Server Custom Field Formulas. In Project this can be used to find out if a task name contains some special coding. For example perhaps you have used a special naming convention to separate time tracking tasks from other tasks and you need to roll them up separately. By using Instr you don't need to have the coding in a specific position. You can put it at the beginning, middle or end of the name and Instr will still find it. </p>

<p>Instr is also useful in string manipulation because it returns the position of the first occurrence of a string in another string. Using it in conjuntion with the left function you can strip out leading characters.</p>

<p>The InStr syntax is pretty simple:</p>

  <code>  InStr( [start], string_to_search_in, string_to_search_for, [compare] )</code>

<p><code>start</code> is optional. The default is to start at the first character, but if you want to skip the first character then you can set it to another value. This could be useful for looking for the second occurance of the string you are looking for. You could feed in the result + 1 of another <code>instr</code> function to see if the string occurs again. Using this recursively you could count specific characters.</p>

<p><code>string_to_search_in</code> is the string that will be searched.</p>

<p><code>string_to_search_for</code> is the string to search for.</p>

<p><code>compare</code> is optional. By default it does a text compare so most likely you can leave it out. The valid choices are: <code>vbBinaryCompare, vbTextCompare</code> and <code>vbDatabaseCompare</code>. I'm not even sure what vbDatabaseCompare is so don't worry about setting compare unless you are doing something a bit more advanced.</p>

<p>Here are a couple of examples:</p>
<ul>
<li>InStr(1, "This is a time tracking task", "tracking") would return 16.
<li>InStr("This is a time tracking task", "is") would return 3.
<li>InStr(10, "This is a time tracking task", "t") would return 11.
<li>InStr("This is a time tracking task", "abalone") would return 0.</ul>

<p>From the examples, you can see when it CAN'T find what it is looking for it will return 0. This is an important point to remember. The typical test I'd use in a custom field formula would be to test the return from instr in an iif formula. Maybe something like this:</p>
<code>iif(instr("My haystack","needle")>0,"ouch", "zzzzzzzzz")</code>

]]>

</content>
</entry>
<entry>
<title>Las Vegas as an oyster</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/architecture/las-vegas-as-an-oyster.html" />
<modified>2007-11-19T03:07:27Z</modified>
<issued>2007-11-19T02:52:01Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.531</id>
<created>2007-11-19T02:52:01Z</created>
<summary type="text/plain"> I visited Las Vegas for the first time this last week and my first impression was that it is a city that works very hard to keep you inside. Finding the exit to a casino is an adventure in...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Architecture</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<img src="http://jackdahlgren.com/cs/photos/sample/images/13/500x375.aspx" alt="Las Vegas Sidewalk">
<p>I visited Las Vegas for the first time this last week and my first impression was that it is a city that works very hard to keep you inside. Finding the exit to a casino is an adventure in itself. Walking along the "Strip" with its broken pavements, escort touts flapping hooker cards and caged-in walkways only encourages you to stay inside. And they spend a lot of money on making the inside attractive. Much of it is not to my taste, but the Chihuly light fixture in the Bellagio is quite wonderful. </p>
<img src="http://jackdahlgren.com/cs/photos/sample/images/12/500x375.aspx" alt="Chihuly Light Fixture"><p>Like an oyster, the pearl inside is more attractive than the shell, and like an oyster there is some risk in consuming it.</p>]]>

</content>
</entry>
<entry>
<title>Project Server 2007 Service Pack 1</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/project-2007/project-server-2007-service-pack-1.html" />
<modified>2007-11-08T20:20:55Z</modified>
<issued>2007-11-08T20:12:54Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.529</id>
<created>2007-11-08T20:12:54Z</created>
<summary type="text/plain">So... the good news is when pushed for an answer in front of his boss, Mike Angiulo finally gave a date for the long awaited release of Microsoft Office Project Server 2007. The bad news is that the date is...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Project 2007</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<p>So... the good news is when pushed for an answer in front of his boss, Mike Angiulo finally gave a date for the long awaited release of Microsoft Office Project Server 2007. The bad news is that the date is in March or April of 2008, more than a year after the release of Project Server.</p>

<p>Details and a critical (but I'm hearing accurate...) write up of the announcement and the Project Conference can be found <a href="http://www.pssi.biz/sp1/">here</a></p>

<p>I hope that Mr. Angiulo will exceed expectations and deliver early. It would be a celebration for applause.</p>]]>

</content>
</entry>
<entry>
<title>I&apos;m faster</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/ichthyology/im-faster.html" />
<modified>2007-11-07T21:21:13Z</modified>
<issued>2007-11-07T21:06:28Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.528</id>
<created>2007-11-07T21:06:28Z</created>
<summary type="text/plain"> This jelly fish spends its life in a glass box in the Monterey Aquarium. I spend my life in a box that has fabric panels that you can stick pins in. The jelly fish gets more admiration. But it...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Ichthyology</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<img src="http://static.zooomr.com/images/3686063_2bb0879661.jpg" title="Jelly Fish at Monterey Aquarium">

<p>
This jelly fish spends its life in a glass box in the Monterey Aquarium. </p><p>

I spend my life in a box that has fabric panels that you can stick pins in.</p><p>

The jelly fish gets more admiration.</p><p>

But it is basically the same feeling of weightless otherworldliness we must both experience when swimming at night.</p><p>

Miscellaneous notes on aquarium photography:<ul>
<li>Many museums do not allow tripods or monopods.
<li>Go mid-week when there are no crowds.
<li>Hold the camera close against the glass to avoid reflections.
<li>Don't use flash on Jellies. They look best back-lit.
<li>Use the fastest lens and camera speed (ISO) that you can.
</ul></p>
]]>

</content>
</entry>
<entry>
<title>Golden Glow</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/architecture/golden-glow.html" />
<modified>2007-09-23T05:49:40Z</modified>
<issued>2007-09-23T05:45:42Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.525</id>
<created>2007-09-23T05:45:42Z</created>
<summary type="text/plain"> I heard my blog doesn&apos;t look as good as it used to so I&apos;ll post a few pictures while you are all waiting for my next post on formatting your gantt chart.This is the Golden Gate Bridge in fog...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Architecture</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<img src="http://static.zooomr.com/images/3088122_f81943c0d9.jpg" alt="Golden Gate Bridge at Night">
<p>I heard my blog doesn't look as good as it used to so I'll post a few pictures while you are all waiting for my next post on formatting your gantt chart.</p><p>This is the Golden Gate Bridge in fog taken on my way home from a company dinner a few weeks back.</p>]]>

</content>
</entry>
<entry>
<title>Views and Tables in Microsoft Project</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/ms-project-tips/views-and-tables-in-microsoft-project.html" />
<modified>2007-08-29T19:16:01Z</modified>
<issued>2007-08-29T19:11:22Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.520</id>
<created>2007-08-29T19:11:22Z</created>
<summary type="text/plain">There is often some confusion about the difference between a view and a table in Microsoft Project. This should help clarify the difference between the two. A view consists of a number of potential elements: A screen (the right side...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>MS Project Tips</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<p>There is often some confusion about the difference between a view and a table in Microsoft Project. This should help clarify the difference between the two.</p>

<p>A view consists of a number of potential elements: </p>

<p>A screen (the right side typically, but may include splits. Also includes any special formatting for that screen such as modified barstyles etc.)<br />
A table (the data displayed on the right side<br />
A group (optional)<br />
A filter (typically "All tasks" but may be anything you want)</p>

<p>Different views may access the same table or group or filter or screen but may use a different combination.<br />
Modifying a table will affect all views which use that table.<br />
For this reason, and because I frequently add/remove columns, it is good practice to build a specific table for each view. For example you might build a presentation view which uses a table and filter customized to show only the elements you want to present, or a print view etc.</p>

<p>The data displayed in the table or view does not belong to the table. It is present in the file and is only displayed in the table, so deleting columns in the table does not delete that information. Deleting a row however will delete the information.</p>

<p>This information is the same for all versions of Project, with the exception of Project 98 and earlier which did not have grouping.</p>]]>

</content>
</entry>
<entry>
<title>10 pieces of advice to a new blogger</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/bl_gging/10-pieces-of-advice-to-a-new-blogger.html" />
<modified>2007-08-07T20:37:08Z</modified>
<issued>2007-08-07T18:24:20Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.516</id>
<created>2007-08-07T18:24:20Z</created>
<summary type="text/plain">I wrote this email to someone who is considering starting a blog. Building your blog: If no one reads your blog you will give up on it eventually. There is no point writing something that no one reads. So you...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Bl_gging</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<p>I wrote this email to someone who is considering starting a blog.</p>

<p>Building your blog:</p>

<p>If no one reads your blog you will give up on it eventually. There is no point writing something that no one reads. So you need to have some way for people to find it. 
Search engines are the main way to get traffic. This requires that you have something worth reading on your site first.</p>

<p>85% of the people who arrive at my site found it through Google. Maybe 5% use Yahoo and 1% use MSN. The rest are from links here and there.  This article gives some pointers on making your blog search engine friendly:</p>
<a href="http://www.learningmovabletype.com/a/000238search_engine_optimization/">http://www.learningmovabletype.com/a/000238search_engine_optimization/</a>

<p>Here are my top ten pieces of advice:</p>
<ol>
<li>Include your blog URL in your newsgroup signature and if you have already solved a problem then point people to the in-depth article about it. 
<li>Don’t submit your site to the search engines! Rumor is that they put you in a sandbox for a few months if you do so. If you have good content you can get people to link to your site and Google will follow those links and index your site. The more links the more important Google thinks your site is. But go slow on getting other people to link to you. Steady growth is rewarded. Fast growth looks like spam to the search engines.
<li>Don’t go too wild with categories. I think I have too many, but after a while you have too much stuff to bother reorganizing.
<li>Keep focused on one main topic which you care enough about to spend time on. I throw a lot of different sorts of crap in my blog and I don’t think it does much to help me. I noticed I was posting enough about other things that I created a second blog (http://zo-d.com/stuff) to handle miscellaneous postings. But then I also created a few other blogs I completely abandoned so don’t go overboard. 
<li>Don’t bother creating daily or weekly or monthly or yearly archives. They will confuse the search engines and no body cares about them anyway.
<li>Don’t expect much for 6 months or so. Traffic is roughly proportional to the amount of content you have. The more you write, the more it grows.
<li>Keep articles short. Attention spans for online reading last about a single page at most. Unless you are a brilliant writer, most people just want an answer to their question or some new knowledge. They won’t finish reading something that is too long. You can always break long articles up into a series of smaller ones.
<li>Start any post with a attractive and relevant description. The first sentence often shows up in the search results so don’t be writing things like “I was at the coffee shop with Blaise and I spilled a frappuchino on my pants” and then launch into how to set up a workflow in Sharepoint. The Sharepoint readers will be disappointed and so will the coffee on the pants fetishisti.
<li>If there is something you have taken the time to research and understand, share it. For example, I’m probably putting this list on my blog.
<li>Ignore this advice and try to have fun with it. I disregard any of these rules if they interfere with my enjoyment. The rewards of blogging are subtle so if you don’t get enjoyment from the process, then you will soon realize you are wasting your time.
</ol>
]]>

</content>
</entry>
<entry>
<title>OpenProj First Look</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/microsoft-project/openproj-first-look.html" />
<modified>2007-08-06T18:14:26Z</modified>
<issued>2007-08-06T17:47:51Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.515</id>
<created>2007-08-06T17:47:51Z</created>
<summary type="text/plain"> Projity is introducing a new free MS Project compatible scheduling program which they bill as &quot;a complete open source desktop replacement of Microsoft Project&quot;. I have tried the beta briefly (https://www.projity.com/openproj/) and I like what I see. While it...</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Microsoft Project</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<img alt="openproj.jpg" src="http://msproject.info/project_answers/zimages/openproj.jpg" width="500" height="347" />
<p>Projity is introducing a new free MS Project compatible scheduling program which they bill as "a complete open source desktop replacement of Microsoft Project". I have tried the beta briefly (<a href="https://www.projity.com/openproj/">https://www.projity.com/openproj/</a>) and I like what I see. While it looks very much like a clone of MS Project, it strips down some of the complexity from the interface and makes some common tasks easier (viewing a stacked resource graph for example). It opened my MS existing MS Project 2003 .xml files with no visible problems - though even MS Project has some quirks in handling .xml files, so it will pay to double check this before using for a real schedule.</p>
<p>I think this is the first MS Project viewer which will really make inroads against MS Project. This is true for a number of reasons:</p>
<ul>
<li>It is free
<li>Look and feel similar to Project (maybe too similar... but let the lawyers decide)
<li>File compatibility
<li>Ability to edit and create schedules
<li>Cross-platform compatibility (Mac users will rejoice after being denied the latest versions of Microsoft Project)
</ul>
<p>The developers of OpenProj appear to have come from Scitor (now Sciforma) which was known for their "Project Scheduler" software, the latest version of which is PS8. PS was always an also-ran in comparison to project because of Microsoft's millions of installed versions of Office and associated enterprise licensing. By focusing on compatibility and on Linux/Mac and by providing the software for free, Projity may have a better chance of initiating cracks in the marketplace. The ultimate goal for them must be in project hosting or selling enterprise-level features (multi-project support etc.).</p>
<p>On the other hand, I think that desktop scheduling products are fairly dormant. Microsoft has been moving away from them by adding things like server-side scheduling and the ability to create and maintain projects through Project Web Access. Meanwhile, new features on the desktop are very slow in coming.</p>
<p>The next battleground will be online scheduling and by providing a full featured client for free, Projity is signalling their readiness to fight. It should be interesting to see how things go. Competition in this space will drive Microsoft harder and that should be good for everyone.</p>
<p>I'll try and get to a more in depth review when I have a chance.</p>
]]>

</content>
</entry>
<entry>
<title>Coming Home</title>
<link rel="alternate" type="text/html" href="http://Zo-d.com/blog/archives/design/coming-home.html" />
<modified>2007-08-04T02:55:03Z</modified>
<issued>2007-08-04T02:47:03Z</issued>
<id>tag:Zo-d.com,2007:/blog//2.514</id>
<created>2007-08-04T02:47:03Z</created>
<summary type="text/plain"> One thing I like about airports is moving walks. This one is in the connection between the International Terminal and the International Parking Garage at SFO. It is the last of the airport that I see when coming home....</summary>
<author>
<name>Jack</name>
<url>http://masamiki.com</url>
<email>Jack.dahlgren@gmail.com</email>
</author>
<dc:subject>Design</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://Zo-d.com/blog/">
<![CDATA[<p><img src="http://static.zooomr.com/images/2855614_0fd4c35216.jpg" alt="Moving Walkway San Francisco Airport"></p><p>
One thing I like about airports is moving walks. This one is in the connection between the International Terminal and the International Parking Garage at SFO. It is the last of the airport that I see when coming home. </p>
<p>
<img src="http://static.zooomr.com/images/2855606_b05039c2a6.jpg"></p>]]>

</content>
</entry>

</feed>