<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>projectified : VBA</title><link>http://blogs.technet.com/projectified/archive/tags/VBA/default.aspx</link><description>Tags: VBA</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Three Point Estimation (PERT) in Project 2010: Take 1</title><link>http://blogs.technet.com/projectified/archive/2009/11/24/3296207.aspx</link><pubDate>Wed, 25 Nov 2009 05:47:04 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3296207</guid><dc:creator>brianken</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.technet.com/projectified/comments/3296207.aspx</comments><wfw:commentRss>http://blogs.technet.com/projectified/commentrss.aspx?PostID=3296207</wfw:commentRss><wfw:comment>http://blogs.technet.com/projectified/rsscomments.aspx?PostID=3296207</wfw:comment><description>&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;pre id="codeSnippet" class="csharpcode"&gt;&amp;nbsp;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;As some of you may already know the PERT Addin that was in Project for several versions was NOT included in Project 2010. The good news is that below we have the first version of some sample code you can use to add the feature back into the product! This first version does not use a form like the old one. It uses custom fields at the task level to store the Pessimistic, Optimistic and Most Likely estimates and the weights for each estimate. This is just a preliminary version. We hope to gather feedback and then release a future version of the code as a Visual Studio project that can be customized and used to create a Project 2010 Addin.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This code depends on using 7 task level custom fields:&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="2" width="238"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="86"&gt;&lt;strong&gt;Field Name&lt;/strong&gt;&lt;/td&gt;
&lt;td valign="top" width="150"&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="86"&gt;Duration1&lt;/td&gt;
&lt;td valign="top" width="150"&gt;Optimistic Duration&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="86"&gt;Duration2&lt;/td&gt;
&lt;td valign="top" width="150"&gt;Most Likely Duration&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="86"&gt;Duration3&lt;/td&gt;
&lt;td valign="top" width="150"&gt;Pessimistic Duration&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="86"&gt;Number1&lt;/td&gt;
&lt;td valign="top" width="150"&gt;Optimistic Weight&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="86"&gt;Number2&lt;/td&gt;
&lt;td valign="top" width="150"&gt;Most Likely Weight&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="86"&gt;Number3&lt;/td&gt;
&lt;td valign="top" width="150"&gt;Pessimistic Weight&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;
&lt;td valign="top" width="86"&gt;Text30&lt;/td&gt;
&lt;td valign="top" width="150"&gt;Calculation State&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The image below shows a Gantt Chart view with these fields inserted. In this example we see weights only on the first task. This is an option you can set in the code. If the option is set to ‘False’ then each task can have its own set of weights. Duration estimates are inserted for each task. The code at this point will estimate every task. &lt;em&gt;(We could add the option to allow a project manager to specify which tasks should be estimated.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/ThreePointEstimationPERTinProject2010Tak_1203B/image_4.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/ThreePointEstimationPERTinProject2010Tak_1203B/image_thumb_1.png" width="807" height="71"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To use this sample code in your own projects:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open Project 2010 
&lt;li&gt;Click on the View Tab of the Ribbon 
&lt;li&gt;Click Macro | Visual Basic 
&lt;li&gt;Double Click on the “ThisProject (Global.MPT)” node just under the ProjectGlobal node&lt;br&gt;&lt;a href="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/ThreePointEstimationPERTinProject2010Tak_1203B/image_6.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/ThreePointEstimationPERTinProject2010Tak_1203B/image_thumb_2.png" width="297" height="213"&gt;&lt;/a&gt; 
&lt;li&gt;In the code window that opens up on the right paste in the code below 
&lt;li&gt;Decide if you want to use only one set of weights or if you want each task to have its own set of weights&lt;br&gt;If you want one set leave the code as it is. If you want separate weights then change this: “UseOneSetofWeights = True” to this:&lt;br&gt;”UseOneSetofWeights = False” 
&lt;li&gt;Close the Visual Basic Editor 
&lt;li&gt;Click on the “Customize Quick Access Toolbar” item on the ribbon&lt;br&gt;&lt;a href="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/ThreePointEstimationPERTinProject2010Tak_1203B/image_8.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/ThreePointEstimationPERTinProject2010Tak_1203B/image_thumb_3.png" width="304" height="132"&gt;&lt;/a&gt; 
&lt;li&gt;Click on “More Commands” 
&lt;li&gt;In the “Choose commands from” list box pick “Macros” 
&lt;li&gt;Select “PERT” in the left hand box and then click the Add button&lt;br&gt;&lt;a href="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/ThreePointEstimationPERTinProject2010Tak_1203B/image_10.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/ThreePointEstimationPERTinProject2010Tak_1203B/image_thumb_4.png" width="342" height="317"&gt;&lt;/a&gt; 
&lt;li&gt;Click OK&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Now the code is ready to be used. All that is left is to insert the fields in the table above into a Gantt Chart view, enter your estimates and your weights &lt;font color="#ff0000"&gt;&lt;strong&gt;(Remember that the weights must add up to 6!!)&lt;/strong&gt;&lt;/font&gt; and then run the macro using the Quick Launch button you just added.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Feedback Wanted!!&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is just a first pass at a sample for replacing the PERT functionality. Please email me (&lt;a href="mailto:brian.kennemer@microsoft.com"&gt;brian.kennemer@microsoft.com&lt;/a&gt;) with your feedback.&lt;/p&gt;
&lt;p&gt;Some things to think about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Should there be the ability to specify which tasks should have their Durations estimated when the tool is run? 
&lt;li&gt;Do you prefer a form for setting the weights? 
&lt;li&gt;What other options would you like to see?&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;&lt;font color="#ff0000" size="4"&gt;&lt;strong&gt;&lt;em&gt;One last thing: This is just sample code and should be thoroughly tested before you use it on a ‘production’ project.&lt;/em&gt;&lt;/strong&gt;&lt;/font&gt;&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;_____________________________________________________________________________________________________________&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sub PERT()&lt;br&gt;Dim tskT As Task&lt;br&gt;Dim tskFirst As Task&lt;br&gt;Dim FoundBadWeights As Boolean&lt;br&gt;Dim UseOneSetofWeights As Boolean 
&lt;p&gt;UseOneSetofWeights = True&lt;br&gt;FoundBadWeights = False 
&lt;p&gt;CustomFieldRename FieldID:=pjCustomTaskDuration1, NewName:="Optimistic Duration"&lt;br&gt;CustomFieldRename FieldID:=pjCustomTaskDuration2, NewName:="Most Likely Duration"&lt;br&gt;CustomFieldRename FieldID:=pjCustomTaskDuration3, NewName:="Pessimistic Duration"&lt;br&gt;CustomFieldRename FieldID:=pjCustomTaskNumber1, NewName:="Optimistic Weight"&lt;br&gt;CustomFieldRename FieldID:=pjCustomTaskNumber2, NewName:="Most Likely Weight"&lt;br&gt;CustomFieldRename FieldID:=pjCustomTaskNumber3, NewName:="Pessimistic Weight"&lt;br&gt;CustomFieldRename FieldID:=pjCustomTaskText30, NewName:="PERT State" 
&lt;p&gt;If UseOneSetofWeights = True Then&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set tskFirst = ActiveProject.Tasks(1)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each tskT In ActiveProject.Tasks&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not (tskT Is Nothing) Then&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If tskT.PercentComplete = 0 And tskT.PercentWorkComplete = 0 Then&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (tskFirst.Number1 + tskFirst.Number2 + tskFirst.Number3) = 6 Then&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tskT.Duration = ((((tskT.Duration1) * tskFirst.Number1) _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + ((tskT.Duration2) * tskFirst.Number2) _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + ((tskT.Duration3) * tskFirst.Number3)) / 6)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tskT.Text30 = "Duration Calc'd: " &amp;amp; Now()&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tskT.Text30 = "Not Calc'd: Weights &amp;lt;&amp;gt; 6"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FoundBadWeights = True&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tskT.Text30 = "Not Calc'd: Task In Progress or Complete"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next tskT&lt;br&gt;Else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each tskT In ActiveProject.Tasks&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not (tskT Is Nothing) Then&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If tskT.PercentComplete = 0 And tskT.PercentWorkComplete = 0 Then&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (tskT.Number1 + tskT.Number2 + tskT.Number3) = 6 Then&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tskT.Duration = ((((tskT.Duration1) * tskT.Number1) _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + ((tskT.Duration2) * tskT.Number2) _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; + ((tskT.Duration3) * tskT.Number3)) / 6)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tskT.Text30 = "Duration Calc'd: " &amp;amp; Now()&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tskT.Text30 = "Not Calc'd: Weights &amp;lt;&amp;gt; 6"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FoundBadWeights = True&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tskT.Text30 = "Not Calc'd: Task In Progress or Complete"&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next tskT&lt;br&gt;End If&lt;br&gt;If FoundBadWeights = True Then&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox Prompt:="Some Tasks Weight Values were found to be incorrect." &amp;amp; _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Chr(13) &amp;amp; "Check the Text30 fields for details.", Buttons:=vbCritical, _&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Title:="WorkPERT Weights Error"&lt;br&gt;End If&lt;br&gt;End Sub 
&lt;p&gt;&lt;/p&gt;&lt;!--CRLF--&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3296207" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/projectified/archive/tags/Scheduling/default.aspx">Scheduling</category><category domain="http://blogs.technet.com/projectified/archive/tags/VBA/default.aspx">VBA</category><category domain="http://blogs.technet.com/projectified/archive/tags/Project+2010/default.aspx">Project 2010</category></item><item><title>Code to Show Which Tasks have Which Baselines Saved</title><link>http://blogs.technet.com/projectified/archive/2009/03/20/3215972.aspx</link><pubDate>Sat, 21 Mar 2009 02:38:43 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3215972</guid><dc:creator>brianken</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/projectified/comments/3215972.aspx</comments><wfw:commentRss>http://blogs.technet.com/projectified/commentrss.aspx?PostID=3215972</wfw:commentRss><wfw:comment>http://blogs.technet.com/projectified/rsscomments.aspx?PostID=3215972</wfw:comment><description>&lt;p&gt;Here is a sample of some VBA code that will populate the Task Text30 field with the numbers of the baselines for which each task has values saved. This is useful if you are using lots of the baselines but not all your tasks have had all the baselines saved.&lt;/p&gt;  &lt;p&gt;For example:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/CodetoShowWhichTaskshaveWhichBaselinesSa_EA11/image_4.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/CodetoShowWhichTaskshaveWhichBaselinesSa_EA11/image_thumb_1.png" width="209" height="75" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;“Task” has values in Baseline, Baseline2, Baseline4 and Baseline9 while “Other Task” only has values in Baseline2.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;Sub&lt;/span&gt; WhichBaselinesSaved()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&lt;span class="kwrd"&gt;Dim&lt;/span&gt; t &lt;span class="kwrd"&gt;As&lt;/span&gt; Task&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;Dim&lt;/span&gt; i &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;Long&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;&amp;#160;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;&lt;span class="kwrd"&gt;For&lt;/span&gt; &lt;span class="kwrd"&gt;Each&lt;/span&gt; t &lt;span class="kwrd"&gt;In&lt;/span&gt; ActiveProject.Tasks&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    &lt;span class="kwrd"&gt;If&lt;/span&gt; &lt;span class="kwrd"&gt;Not&lt;/span&gt; (t &lt;span class="kwrd"&gt;Is&lt;/span&gt; &lt;span class="kwrd"&gt;Nothing&lt;/span&gt;) &lt;span class="kwrd"&gt;Then&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        t.Text30 = &lt;span class="str"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;        &lt;span class="kwrd"&gt;For&lt;/span&gt; i = 0 &lt;span class="kwrd"&gt;To&lt;/span&gt; 10&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;            &lt;span class="kwrd"&gt;If&lt;/span&gt; i = 0 &lt;span class="kwrd"&gt;Then&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                &lt;span class="kwrd"&gt;If&lt;/span&gt; t.BaselineStart &amp;lt; 50000 &lt;span class="kwrd"&gt;Then&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                    t.Text30 = t.Text30 &amp;amp; i &amp;amp; &lt;span class="str"&gt;&amp;quot;, &amp;quot;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;            &lt;span class="kwrd"&gt;ElseIf&lt;/span&gt; &lt;span class="kwrd"&gt;Not&lt;/span&gt; t.GetField(Application.FieldNameToFieldConstant(&lt;span class="str"&gt;&amp;quot;Baseline&amp;quot;&lt;/span&gt; _&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;            &amp;amp; i &amp;amp; &lt;span class="str"&gt;&amp;quot;Start&amp;quot;&lt;/span&gt;, pjTask)) = &lt;span class="str"&gt;&amp;quot;NA&amp;quot;&lt;/span&gt; &lt;span class="kwrd"&gt;Then&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;                    t.Text30 = t.Text30 &amp;amp; i &amp;amp; &lt;span class="str"&gt;&amp;quot;, &amp;quot;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;            &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Next&lt;/span&gt; i&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;        t.Text30 = Left$(t.Text30, Len(t.Text30) - 2)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;If&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;    &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;&lt;span class="kwrd"&gt;Next&lt;/span&gt; t&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;&lt;span class="kwrd"&gt;End&lt;/span&gt; Sub&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3215972" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/projectified/archive/tags/VBA/default.aspx">VBA</category></item><item><title>Moving Tasks With VBA</title><link>http://blogs.technet.com/projectified/archive/2008/10/06/3133229.aspx</link><pubDate>Tue, 07 Oct 2008 06:17:09 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3133229</guid><dc:creator>brianken</dc:creator><slash:comments>1</slash:comments><comments>http://blogs.technet.com/projectified/comments/3133229.aspx</comments><wfw:commentRss>http://blogs.technet.com/projectified/commentrss.aspx?PostID=3133229</wfw:commentRss><wfw:comment>http://blogs.technet.com/projectified/rsscomments.aspx?PostID=3133229</wfw:comment><description>&lt;p&gt;So the problem was that a customer wanted to be able to move a task that was at ID 7 and move it so that it was at ID 2. Sadly, VBA for Project does not contain a Task.Move method. But with a little bit of code around them you can use a Cut and Paste methods for Rows.&lt;/p&gt;  &lt;p&gt;The example below assumes that you know the name of the task you want to move and the name of the task that currently occupies the row where you want to move the first task. &lt;/p&gt;  &lt;p&gt;Here is a sample task list. This sample is a good test because the tasks are out of ID order. The task I want to move (name = 7) is in ID position 3 and I want to move it to where Task 2 is now (currently in ID position 9.)&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/MovingTasksWithVBA_11CF6/image_2.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://blogs.technet.com/blogfiles/projectified/WindowsLiveWriter/MovingTasksWithVBA_11CF6/image_thumb.png" width="113" height="226" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Arial"&gt;Sub TaskMover()     &lt;br /&gt;Dim t As Task      &lt;br /&gt;Dim NewID As Integer &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Arial"&gt;For Each t In ActiveProject.Tasks     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; If Not (t Is Nothing) Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If t.Name = 2 Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NewID = t.ID      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If t.Name = 7 Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SelectRow Row:=t.ID, Rowrelative:=False      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; EditCut      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; End If      &lt;br /&gt;Next t &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Arial"&gt;SelectRow Row:=NewID, Rowrelative:=False     &lt;br /&gt;EditPaste &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Arial"&gt;End Sub&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This code is not very elegant in that it requires us to select a row and then cut it and then select another row and then paste it. It also requires that the view in the activewindow is a Task view. There is some code we can use to test to make sure the view is the right type. “ActiveWindow.TopPane.View.Type” should be “0” or “pjTaskItem”. So it is not perfect but it gets the job done. You can use this as a starting point for your own needs.&lt;/p&gt;  &lt;p&gt;So the new code with this view type test would look like this:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Arial"&gt;Sub TaskMover()     &lt;br /&gt;Dim t As Task      &lt;br /&gt;Dim NewID As Integer      &lt;br /&gt;If ActiveWindow.TopPane.View.Type = pjTaskItem Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; For Each t In ActiveProject.Tasks      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If Not (t Is Nothing) Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If t.Name = 2 Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NewID = t.ID      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If t.Name = 7 Then      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; SelectRow Row:=t.ID, Rowrelative:=False      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; EditCut      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Next t      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; SelectRow Row:=NewID, Rowrelative:=False      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; EditPaste      &lt;br /&gt;End If      &lt;br /&gt;End Sub&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3133229" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/projectified/archive/tags/VBA/default.aspx">VBA</category><category domain="http://blogs.technet.com/projectified/archive/tags/Project+2007/default.aspx">Project 2007</category></item><item><title>No Thanks, I’ll Be Having the Crow</title><link>http://blogs.technet.com/projectified/archive/2008/07/18/3090744.aspx</link><pubDate>Fri, 18 Jul 2008 15:43:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3090744</guid><dc:creator>brianken</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/projectified/comments/3090744.aspx</comments><wfw:commentRss>http://blogs.technet.com/projectified/commentrss.aspx?PostID=3090744</wfw:commentRss><wfw:comment>http://blogs.technet.com/projectified/rsscomments.aspx?PostID=3090744</wfw:comment><description>&lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;File this under reason 467 why I don’t make my living as a full time developer.&lt;/p&gt;  &lt;p&gt;Yesterday I &lt;a href="http://blogs.technet.com/projectified/archive/2008/07/17/3090272.aspx" target="_blank"&gt;posted some code&lt;/a&gt; for parsing out a comma delimited text field, such as a multi-value enterprise field in Project Server 2007.&lt;/p&gt;  &lt;p&gt;Today a &lt;a href="http://peltiertech.com/WordPress/" target="_blank"&gt;real developer&lt;/a&gt; pointed out that there is a function that does the same thing as my code. DOH!&lt;/p&gt;  &lt;p&gt;So here is the new code, most of which is just there to display the results of the function.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Arial" size="2"&gt;Sub Doh()        &lt;br /&gt;Dim count As Long &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;Dim Values As Variant &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;Values = Split(ActiveProject.Tasks(1).Text1, &amp;quot;,&amp;quot;) &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;'just for display        &lt;br /&gt;For count = 0 To UBound(Values)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Debug.Print Trim(Values(count))         &lt;br /&gt;Next count         &lt;br /&gt;'----------------         &lt;br /&gt;End Sub&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3090744" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/projectified/archive/tags/Project+Server+2007/default.aspx">Project Server 2007</category><category domain="http://blogs.technet.com/projectified/archive/tags/VBA/default.aspx">VBA</category></item><item><title>VBA Code For Parsing a MultiValue Text Field</title><link>http://blogs.technet.com/projectified/archive/2008/07/17/3090272.aspx</link><pubDate>Thu, 17 Jul 2008 21:43:03 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3090272</guid><dc:creator>brianken</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/projectified/comments/3090272.aspx</comments><wfw:commentRss>http://blogs.technet.com/projectified/commentrss.aspx?PostID=3090272</wfw:commentRss><wfw:comment>http://blogs.technet.com/projectified/rsscomments.aspx?PostID=3090272</wfw:comment><description>&lt;p&gt;If you are in Project Server 2007 you can have an Enterprise Text using a lookup table that can contain more than one value. If you then need to work with that field data in code (VBA or VSTO) you can use the GetField function to get the value of that field. The catch is that it is returned as a comma delimited string with all the values in it. So if your field had three values selected (Value1, Value19 and Value26) it gets returned as “Value1, Value19, Value26”.&lt;/p&gt;  &lt;p&gt;The code below shows how to parse this into an array where it will be easier to work with in code.&lt;/p&gt;  &lt;p&gt;As always, take this code and make it your own. This includes doing testing to make sure it does what it is supposed to do. It worked for me on a very limited set of test data. Don’t just throw this into production. ;-)&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;Sub Parse_Comma_Delimited_Field_Into_Array() &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;Dim Char As Integer        &lt;br /&gt;'Char is used to hold each character in the string to see if it is a comma &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;Dim WholeField As String        &lt;br /&gt;'Wholefield is a string that holds the entire value of the field to be parsed &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;Dim Values() As String        &lt;br /&gt;'Values is the string array that will contain the parsed values &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;Dim NumberofValues As Integer        &lt;br /&gt;'NumberofValues holds the number of values in the 'wholefield'         &lt;br /&gt;'so that the 'Values' array can be redim'd &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;Dim StartofLastValue As Integer        &lt;br /&gt;'holds the number of characters from the left of the string where the last         &lt;br /&gt;'word started so the value can be pulled from the wholefield string and         &lt;br /&gt;'placed into the array &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;StartofLastValue = 1        &lt;br /&gt;NumberofValues = 0 &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;'---Setting value of WholeField to be parsed        &lt;br /&gt;WholeField = ActiveProject.Tasks(1).Text1         &lt;br /&gt;'---         &lt;br /&gt;If Len(WholeField) &amp;gt; 0 Then         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; For Char = 1 To Len(WholeField)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If Mid$(String:=WholeField, Start:=Char, Length:=1) = &amp;quot;,&amp;quot; _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Or Char = Len(WholeField) Then         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; NumberofValues = NumberofValues + 1         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ReDim Preserve Values(1, NumberofValues)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If Char &amp;lt; Len(WholeField) Then         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Values(1, NumberofValues) = Trim(Mid$(String:=WholeField, _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Start:=StartofLastValue, Length:=Char - StartofLastValue))         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Else         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Values(1, NumberofValues) = Trim(Mid$(String:=WholeField, _         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Start:=StartofLastValue, Length:=Char - (StartofLastValue - 1)))         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; StartofLastValue = Char + 1         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; End If         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Next Char         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; '-------------------------         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 'this section just loops through and shows that the array         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 'contains the correct data.         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; 'Remove after you are finished testing         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Dim count As Integer         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; For count = 1 To NumberofValues         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Debug.Print Values(1, count)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Next count         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; '------------------------- &lt;/font&gt;&lt;/p&gt;    &lt;p&gt;&lt;font face="Arial" size="2"&gt;End If        &lt;br /&gt;End Sub&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3090272" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/projectified/archive/tags/Project+Server+2007/default.aspx">Project Server 2007</category><category domain="http://blogs.technet.com/projectified/archive/tags/VBA/default.aspx">VBA</category><category domain="http://blogs.technet.com/projectified/archive/tags/Project+Server/default.aspx">Project Server</category></item></channel></rss>