<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Office Tech Support - Project, Access, Excel</title>
	<atom:link href="http://officetechsupport.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://officetechsupport.wordpress.com</link>
	<description>MS Project and MS Office VBA Solutions - Trevor Lowing</description>
	<lastBuildDate>Mon, 17 Oct 2011 21:46:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='officetechsupport.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/5692e5d95f0679b152db5c706bbd4ee4?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Office Tech Support - Project, Access, Excel</title>
		<link>http://officetechsupport.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://officetechsupport.wordpress.com/osd.xml" title="Office Tech Support - Project, Access, Excel" />
	<atom:link rel='hub' href='http://officetechsupport.wordpress.com/?pushpress=hub'/>
		<item>
		<title>MS Project Change Calendar and Preserve Dates</title>
		<link>http://officetechsupport.wordpress.com/2011/10/17/ms-project-change-calendar-and-preserve-dates/</link>
		<comments>http://officetechsupport.wordpress.com/2011/10/17/ms-project-change-calendar-and-preserve-dates/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 21:46:36 +0000</pubDate>
		<dc:creator>Trevor Lowing, PMP</dc:creator>
				<category><![CDATA[Microsoft Project]]></category>

		<guid isPermaLink="false">http://officetechsupport.wordpress.com/?p=179</guid>
		<description><![CDATA[Many a Project Manager or Planner has encountered the following scenario: the project team has developed a outline schedule and is ready to snap a baseline when someone notices that the incorrect calendar was used. So how do you change the calendar and preserve the original dates? The following procedure is the only method I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=179&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Many a Project Manager or Planner has encountered the following scenario:  the project team has developed a outline schedule and is ready to snap a baseline when someone notices that the incorrect calendar was used.  So how do you change the calendar and preserve the original dates?  The following procedure is the only method I know of that will let you do this without a lot of rework.</p>
<p>1) Set a Baseline (use Baseline 1-10 if you only want a temp baseline.  Tools-&gt;Tracking-&gt; Save Baseline.  Save Interim Plan-&gt;Copy &#8220;Start/Finish&#8221; Into &#8220;Baseline 1&#8243;)<br />
2) Select all tasks (select row IDs at right, right click and select &#8220;Task Information&#8221;).<br />
3) Go to Task Information-&gt;Advanced and change task type to &#8220;Fixed Units&#8221; and check &#8220;Effort Driven&#8221;<br />
4) Change calendar<br />
5)  Select all tasks, go to task properties and change task type back to &#8220;Fixed Duration&#8221; and uncheck &#8220;Effort Driven if desired. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/officetechsupport.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/officetechsupport.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/officetechsupport.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/officetechsupport.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/officetechsupport.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/officetechsupport.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/officetechsupport.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/officetechsupport.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/officetechsupport.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/officetechsupport.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/officetechsupport.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/officetechsupport.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/officetechsupport.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/officetechsupport.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=179&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://officetechsupport.wordpress.com/2011/10/17/ms-project-change-calendar-and-preserve-dates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9bbcb0dd38aa1d44bdf1a085b0bd3a05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">officetechsupport</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Named Ranges to Import SAP Excel Reports into Access</title>
		<link>http://officetechsupport.wordpress.com/2011/07/15/using-named-ranges-to-import-sap-excel-reports-into-access/</link>
		<comments>http://officetechsupport.wordpress.com/2011/07/15/using-named-ranges-to-import-sap-excel-reports-into-access/#comments</comments>
		<pubDate>Fri, 15 Jul 2011 12:43:05 +0000</pubDate>
		<dc:creator>Trevor Lowing, PMP</dc:creator>
				<category><![CDATA[Microsoft Access]]></category>
		<category><![CDATA[Microsoft Excel]]></category>

		<guid isPermaLink="false">http://officetechsupport.wordpress.com/?p=172</guid>
		<description><![CDATA[SAP is the predominant ERP software for most large businesses. Unfortunately SAP reports are usually exported as Excel spreadsheets that seem poorly formatted for importing into a database using automation (VBA). The trick to import that data is to used Excel Named Ranges. Named ranges are a short textual name given to a cluster of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=172&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>SAP is the predominant ERP software for most large businesses.  Unfortunately SAP reports are usually exported as Excel spreadsheets that seem poorly formatted for importing into a database using automation (VBA).  The trick to import that data is to used Excel Named Ranges.  Named ranges are a short textual name given to a cluster of cells in an Excel worksheet.  Here are the steps to set up an automation routine for importing SAP spreadsheets.</p>
<p>1) Take an example SAP  Excel workbook and use the Access importing wizard (External Data-&gt;Excel in Access 2007 or Access 2010).  Browse to the document and Seelect the Import Option and select Next.</p>
<p>2) From the top of the dialog page that appears select &#8220;Show Named Ranges&#8221; and choose the range named &#8220;SAPBEXqueries!SAPBEXq0001&#8243;.</p>
<p>3) Allow the wizard to select the first row as column headers. Click next.</p>
<p>4) On the field options page I recommend selecting &#8220;Text&#8221; as Data Type for most fields if you are uncertain of their type. Click next and let access add a primary key if you would like. Click Next.</p>
<p>5) Change the name of the table you will be using for import to whatever you would like.  It will probably default to &#8220;SAPBEXqueries&#8221;.  Click finish.</p>
<p>6) Now you have a table with all the proper field definitions to accept automated imports for your automation routine.  All that is left is to build a routine to import the data automatically.</p>
<p><code><br />
Function ImportSAPData()<br />
    Dim strFilePath As String<br />
    strFilePath = "C:\Data\SAP\SAPReport.xls"<br />
    DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, "SAPBEXqueries", strFilePath, True, "SAPBEXqueries$SAPBEXq0001"<br />
    If Err.Number  0 Then<br />
        MsgBox "Error Importing " &amp; strFilePath &amp; "   " &amp; Err.Description<br />
        Err.Clear       'Clear the Error Object<br />
    End If<br />
End Function<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/officetechsupport.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/officetechsupport.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/officetechsupport.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/officetechsupport.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/officetechsupport.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/officetechsupport.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/officetechsupport.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/officetechsupport.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/officetechsupport.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/officetechsupport.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/officetechsupport.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/officetechsupport.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/officetechsupport.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/officetechsupport.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=172&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://officetechsupport.wordpress.com/2011/07/15/using-named-ranges-to-import-sap-excel-reports-into-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9bbcb0dd38aa1d44bdf1a085b0bd3a05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">officetechsupport</media:title>
		</media:content>
	</item>
		<item>
		<title>Referencing CurrentRecord in Access Form DataSheet View</title>
		<link>http://officetechsupport.wordpress.com/2011/07/14/referencing-currentrecord-in-access-form-datasheet-view/</link>
		<comments>http://officetechsupport.wordpress.com/2011/07/14/referencing-currentrecord-in-access-form-datasheet-view/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 13:35:35 +0000</pubDate>
		<dc:creator>Trevor Lowing, PMP</dc:creator>
				<category><![CDATA[Microsoft Access]]></category>

		<guid isPermaLink="false">http://officetechsupport.wordpress.com/?p=167</guid>
		<description><![CDATA[So you want to use a DataSheet form in MS Access to edit your data but you can&#8217;t think of how to reference the record the user has selected? The answer is easy, the record that has the focus can be referenced with the usual &#8220;Me.MyFieldName.Value&#8221; command you use on forms editing a single record. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=167&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So you want to use a DataSheet form in MS Access to edit your data but you can&#8217;t think of how to reference the record the user has selected? The answer is easy,  the record that has the focus can be referenced with the usual  &#8220;Me.MyFieldName.Value&#8221; command you use on forms editing a single record. The frmMYForm.CuccentRecord command will return a Long value representing the current row-number &#8211; probably more useful for color-coding or highlighting the currently selected row.</p>
<p><code><br />
Private Sub Field1_Change()<br />
    MsgBox Me.Field1.Value<br />
End Sub<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/officetechsupport.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/officetechsupport.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/officetechsupport.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/officetechsupport.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/officetechsupport.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/officetechsupport.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/officetechsupport.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/officetechsupport.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/officetechsupport.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/officetechsupport.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/officetechsupport.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/officetechsupport.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/officetechsupport.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/officetechsupport.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=167&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://officetechsupport.wordpress.com/2011/07/14/referencing-currentrecord-in-access-form-datasheet-view/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9bbcb0dd38aa1d44bdf1a085b0bd3a05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">officetechsupport</media:title>
		</media:content>
	</item>
		<item>
		<title>Quickly Creating or Updating a Custom MS Project Calendar</title>
		<link>http://officetechsupport.wordpress.com/2010/07/31/rapidly-building-a-custom-ms-project-calendar/</link>
		<comments>http://officetechsupport.wordpress.com/2010/07/31/rapidly-building-a-custom-ms-project-calendar/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 21:37:47 +0000</pubDate>
		<dc:creator>Trevor Lowing, PMP</dc:creator>
				<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft Project]]></category>

		<guid isPermaLink="false">http://officetechsupport.wordpress.com/?p=153</guid>
		<description><![CDATA[The process of defining a calendar with holidays is a cumbersome and error-prone task in MS Project. Some of the projects I work on can span a decade and go through several calendar revisions so manually creating or revising the calendar is impractical. So Heres a quick way to add and update a custom calendar. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=153&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://office.microsoft.com/en-us/project-help/set-working-times-vacations-and-holidays-for-your-project-HA010351554.aspx">process of defining a calendar</a> with holidays is a cumbersome and error-prone task in MS Project. Some of the projects I work on can span a decade and go through several calendar revisions so manually creating or revising the calendar is impractical. So Heres a quick way to add and update a custom calendar.</p>
<ol>
<li>Create a new project.
<li>Follow <a href="http://office.microsoft.com/en-us/project-help/create-a-calendar-for-a-task-within-project-HA010377765.aspx">this process</a> define the base calendar working days or use a &#8220;Standard&#8221; calendar.</li>
<li>Create a Excel workbook and fill the first worksheet with two columns to represent non-working time periods.  The first column will have period start and the second period end.</li>
<li>Modify the BaseCalName with the base calendar to use, CalName with the name of the new calendar you are creating and ExcelPath with the path to the spreadsheet you created in the previous step.</li>
<li>Paste this function into ThisProject in MS Project by going to Tools&#8211;&gt;Macro&#8211;&gt;Visual Basic Editor.</li>
<li>Run Macro.  This macro will delete any calendar with the same name when it runs before creating the new one.</li>
</ol>
<p><code><br />
Function CreateProjectCalendar()<br />
    Dim oConn As New ADODB.Connection<br />
    Dim oRS As New ADODB.RecordSet<br />
    Dim i As Integer<br />
    Dim CalName, BaseCalName, ExcelPath, strRequest As String<br />
    BaseCalName = "Standard"<br />
    CalName = "MyCalendar"<br />
    ExcelPath = "C:\Book1.xls"</p>
<p>    Dim oCal As Calendar</p>
<p>    'make sure calendar does not already exsits and delete if it does.<br />
    For Each oCal In ActiveProject.BaseCalendars<br />
        If Not oCal Is Nothing Then<br />
            If oCal.Name = CalName Then<br />
                oCal.Delete<br />
            End If</p>
<p>        End If</p>
<p>    Next</p>
<p>    With oConn<br />
        .Provider = "Microsoft.Jet.OLEDB.4.0"<br />
        .Properties("Extended Properties").Value = "Excel 8.0"<br />
        .Open "C:\Book1.xls"<br />
    End With</p>
<p>    strRequest = "SELECT * FROM [Sheet1$]"<br />
    oRS.Open strRequest, oConn<br />
    Application.BaseCalendarCreate Name:=CalName, FromName:=BaseCalName</p>
<p>    Do While Not oRS.EOF</p>
<p>        For i = 0 To oRS.Fields.Count - 1<br />
            If IsDate(oRS.Fields.Item(0).Value) And IsDate(oRS.Fields.Item(1).Value) Then<br />
                Application.BaseCalendarEditDays Name:=CalName, StartDate:=oRS.Fields.Item(0).Value, EndDate:=oRS.Fields.Item(1).Value, Working:=False, Default:=False<br />
            Else<br />
                MsgBox "Error, Bad Date Value: Start=" &amp; oRS.Fields.Item(0).Value &amp; " Finish= " &amp; oRS.Fields.Item(1).Value<br />
            End If<br />
        Next<br />
        oRS.MoveNext<br />
    Loop<br />
    oRS.Close<br />
    oConn.Close<br />
    Set oRS = Nothing<br />
    Set oConn = Nothing</p>
<p>End Function<br />
</code></p>
<p>Cheers,</p>
<p>Trevor Lowing, PMP<br />
Office Tech Support</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/officetechsupport.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/officetechsupport.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/officetechsupport.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/officetechsupport.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/officetechsupport.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/officetechsupport.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/officetechsupport.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/officetechsupport.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/officetechsupport.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/officetechsupport.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/officetechsupport.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/officetechsupport.wordpress.com/153/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/officetechsupport.wordpress.com/153/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/officetechsupport.wordpress.com/153/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=153&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://officetechsupport.wordpress.com/2010/07/31/rapidly-building-a-custom-ms-project-calendar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9bbcb0dd38aa1d44bdf1a085b0bd3a05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">officetechsupport</media:title>
		</media:content>
	</item>
		<item>
		<title>MS Project Date Math</title>
		<link>http://officetechsupport.wordpress.com/2010/07/28/ms-project-date-math/</link>
		<comments>http://officetechsupport.wordpress.com/2010/07/28/ms-project-date-math/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 13:30:33 +0000</pubDate>
		<dc:creator>Trevor Lowing, PMP</dc:creator>
				<category><![CDATA[Microsoft Project]]></category>

		<guid isPermaLink="false">http://officetechsupport.wordpress.com/?p=142</guid>
		<description><![CDATA[Microsoft Project adds a little twist to standard date math. Because tasks and resources can be assigned calendars, special functions must be used to properly perform math operations to account for working days and working hours. Below are some sample functions. Cheers, Trevor Lowing, PMP Office Tech Support Date Math Regular VB Project VBA Project [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=142&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Microsoft Project adds a little twist to standard date math. Because tasks and resources can be assigned calendars, special functions must be used to properly perform math operations to account for working days and working hours. Below are some sample functions.</p>
<p>Cheers,</p>
<p>Trevor Lowing, PMP<br />
Office Tech Support</p>
<h2>Date Math</h2>
<ul>
<li>Regular VB</li>
<li>Project VBA</li>
<li>Project Field Formula</li>
</ul>
<h2>Add Dates</h2>
<ul>
<li>DateAdd(Interval, Number, Date) <a href="http://devguru.com/technologies/vbscript/13914.asp">Read More&#8230;</a></li>
<li>Application.DateAdd(date,duration,calendar)&#042;</li>
<li>ProjDateAdd(date,duration,calendar)&#042;</li>
</ul>
<h2>Subtract Dates</h2>
<ul>
<li>DateAdd(Interval, -Number, Date) <a href="http://devguru.com/technologies/vbscript/13914.asp">Read More&#8230;</a></li>
<li>Application.DateSubtract(date,duration,calendar)&#042;</li>
<li>ProjDateSub(date,duration,calendar)&#042;</li>
</ul>
<h2>Date Difference</h2>
<ul>
<li>DateDiff(interval, date1, date2, firstdayofweek, firstweekofyear) <a href="http://devguru.com/technologies/vbscript/13915.asp">Read More&#8230;</a></li>
<li>Application.DateDifference(date1,date2,calendar)&#042;</li>
<li>ProjDateDiff(date1,date2,calendar)&#042;</li>
</ul>
<p>&#042; Calendar can be expressed as a constant such as ActiveProject.Calendar or a strign name such as &#8220;Standard&#8221;. Duration is in minute units and can be converted to days by the formula &#8220;(60 * ActiveProject.HoursPerDay)&#8221;.  Please see the <a href="http://msdn.microsoft.com/en-us/library/aa679820(v=office.11).aspx">online help</a> for more information.</p>
<p><code><br />
Function FirstWorkingDayOfMonth(ByVal dtmInput As Date) As Date</p>
<p>    Dim dtmLast As Date<br />
    Dim intOneDay As Integer<br />
    intOneDay = (60 * ActiveProject.HoursPerDay)</p>
<p>    'Get Last day of previous month<br />
    dtmLast = DateAdd("d", (Day(dtmInput) - 1) * -1, dtmInput)<br />
    'add one working day<br />
    FirstWorkingDayOfMonth = Application.DateAdd(dtmLast, intOneDay, ActiveProject.Calendar)</p>
<p>End Function</p>
<p>Function LastWorkingDayOfMonth(ByVal dtmInput As Date) As Date</p>
<p>    Dim dtmFirst As Date<br />
    Dim intOneDay As Integer<br />
    intOneDay = (60 * ActiveProject.HoursPerDay)<br />
    'Add one month<br />
    dtmFirst = DateAdd("M", 1, dtmInput)<br />
    'Get first working day of month<br />
    dtmFirst = FirstWorkingDayOfMonth(dtmFirst)</p>
<p>    'subtract one working day<br />
    LastWorkingDayOfMonth = Application.DateSubtract(dtmFirst, intOneDay * 2, ActiveProject.Calendar)</p>
<p>End Function</p>
<p>Function WorkingDaysInMonth(dtmInput As Date) As Integer</p>
<p>    Dim dtmFirst1, dtmFirst2 As Date<br />
    Dim intDays As Integer<br />
    'Get First Day of Month<br />
    dtmFirst1 = DateAdd("d", (Day(dtmInput) - 1) * -1, dtmInput)<br />
    'Get First Day of Next Month<br />
    dtmFirst2 = DateAdd("m", 1, dtmFirst1)</p>
<p>    intDays = Application.DateDifference(dtmFirst1, dtmFirst2, ActiveProject.Calendar) / 60 / ActiveProject.HoursPerDay</p>
<p>    WorkingDaysInMonth = intDays</p>
<p>End Function<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/officetechsupport.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/officetechsupport.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/officetechsupport.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/officetechsupport.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/officetechsupport.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/officetechsupport.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/officetechsupport.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/officetechsupport.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/officetechsupport.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/officetechsupport.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/officetechsupport.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/officetechsupport.wordpress.com/142/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/officetechsupport.wordpress.com/142/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/officetechsupport.wordpress.com/142/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=142&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://officetechsupport.wordpress.com/2010/07/28/ms-project-date-math/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9bbcb0dd38aa1d44bdf1a085b0bd3a05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">officetechsupport</media:title>
		</media:content>
	</item>
		<item>
		<title>Assigning Outlook Contacts a Numerical Customer Id</title>
		<link>http://officetechsupport.wordpress.com/2010/07/19/assigning-outlook-contacts-a-numerical-customer-id/</link>
		<comments>http://officetechsupport.wordpress.com/2010/07/19/assigning-outlook-contacts-a-numerical-customer-id/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 16:57:55 +0000</pubDate>
		<dc:creator>Trevor Lowing, PMP</dc:creator>
				<category><![CDATA[Microsoft Outlook]]></category>

		<guid isPermaLink="false">http://officetechsupport.wordpress.com/?p=120</guid>
		<description><![CDATA[Contacts have a built-in field called CustomerId. After you run this you can add the CustomerId column to the Contact Folder view. Call this on a New Item event for the contact folder to make it automatic. cheers, Trevor Lowing Office Tech Support Sub SetCustomerIDs() Dim ol As Outlook.Application Dim olns As Outlook.NameSpace Dim oConItems [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=120&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Contacts have a built-in field called CustomerId. After you run this you can add the CustomerId column to the Contact Folder view.  Call this on a New Item event for the contact folder to make it automatic.</p>
<p>cheers,</p>
<p>Trevor Lowing<br />
Office Tech Support</p>
<p><code></p>
<p>Sub SetCustomerIDs()<br />
    Dim ol As Outlook.Application<br />
    Dim olns As Outlook.NameSpace<br />
    Dim oConItems As Outlook.Items<br />
    Dim oCurItem As Object<br />
    Dim I, J, iNumItems, iContactId As Integer<br />
    Set ol = New Outlook.Application<br />
    Set olns = ol.GetNamespace("MAPI")<br />
    Set oConItems = olns.GetDefaultFolder(olFolderContacts).Items<br />
    iNumItems = oConItems.Count<br />
    iContactId = 0</p>
<p>    For I = 1 To iNumItems<br />
        Set oCurItem = oConItems.Item(I)<br />
        If TypeName(oCurItem) = "ContactItem" Then<br />
            J = oCurItem.CustomerID<br />
            If IsNumeric(J) Then<br />
                If J &gt; iContactId Then<br />
                    iContactId = J<br />
                End If<br />
            End If<br />
        End If<br />
    Next</p>
<p>    iContactId = iContactId + 1</p>
<p>    For I = 1 To iNumItems<br />
        Set oCurItem = oConItems.Item(I)<br />
        If TypeName(oCurItem) = "ContactItem" Then<br />
            If oCurItem.CustomerID = "" Then<br />
                oCurItem.CustomerID = iContactId<br />
                iContactId = iContactId + 1<br />
                oCurItem.Close olSave<br />
            End If<br />
        End If<br />
    Next<br />
    Set oConItems = Nothing<br />
    Set olns = Nothing<br />
    Set ol = Nothing<br />
End Sub<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/officetechsupport.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/officetechsupport.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/officetechsupport.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/officetechsupport.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/officetechsupport.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/officetechsupport.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/officetechsupport.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/officetechsupport.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/officetechsupport.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/officetechsupport.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/officetechsupport.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/officetechsupport.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/officetechsupport.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/officetechsupport.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=120&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://officetechsupport.wordpress.com/2010/07/19/assigning-outlook-contacts-a-numerical-customer-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9bbcb0dd38aa1d44bdf1a085b0bd3a05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">officetechsupport</media:title>
		</media:content>
	</item>
		<item>
		<title>Tracking MS Project Schedule Baseline Slips in Realtime</title>
		<link>http://officetechsupport.wordpress.com/2010/07/18/tracking-ms-project-schedcule-slips-in-realtime/</link>
		<comments>http://officetechsupport.wordpress.com/2010/07/18/tracking-ms-project-schedcule-slips-in-realtime/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 06:15:54 +0000</pubDate>
		<dc:creator>Trevor Lowing, PMP</dc:creator>
				<category><![CDATA[Microsoft Project]]></category>

		<guid isPermaLink="false">http://officetechsupport.wordpress.com/?p=53</guid>
		<description><![CDATA[Once you have baselined your schedule it becomes very important to monitor schedule changes that cause the forceast to differ from the baseline. The instructions below allow the user to visually track any change from the forecast while you are working on the schedule. This macro works by adding a custom formula to two user [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=53&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Once you have baselined your schedule it becomes very important to monitor schedule changes that cause the forceast to differ from the baseline. The instructions below allow the user to visually track any change from the forecast while you are working on the schedule. </p>
<p>This macro works by adding a custom formula to two user defined MS Project fields.  Additionally, a filter can be added to only view activities flagged at a given Level od the Project WBS. Use the field Number1 to denote the level in the IMS (1-5) and you would have to do the same for the filter to work. Here’s how to make the Level 3 slip checker:</p>
<p>Start Delta</p>
<p>Rename field Number5 to &#8220;Start Delta&#8221;</p>
<p>Add the following formula:</p>
<p><code>IIf([Baseline Start]projdatevalue("NA"),Fix([Start]-[Baseline Start]),0)</code></p>
<p>Finish Delta</p>
<p>Rename field Number6 to &#8220;Finish Delta)</p>
<p>Add the following formula:</p>
<p><code>IIf([Baseline Finish]projdatevalue("NA"),Fix([Finish]-[Baseline Finish]),0)</code></p>
<p>Create the following filter to view only slipped Level 3 tasks:</p>
<p><a href="http://officetechsupport.files.wordpress.com/2010/07/slip-filter.png"><img src="http://officetechsupport.files.wordpress.com/2010/07/slip-filter.png?w=300&#038;h=150" alt="" title="Slip-Filter" width="300" height="150" class="alignnone size-medium wp-image-54" /></a></p>
<p>If you want to see the complete stuff too then leave that part off.</p>
<p>Cheers,</p>
<p>Trevor Lowing<br />
Office Tech Support</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/officetechsupport.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/officetechsupport.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/officetechsupport.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/officetechsupport.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/officetechsupport.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/officetechsupport.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/officetechsupport.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/officetechsupport.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/officetechsupport.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/officetechsupport.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/officetechsupport.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/officetechsupport.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/officetechsupport.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/officetechsupport.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=53&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://officetechsupport.wordpress.com/2010/07/18/tracking-ms-project-schedcule-slips-in-realtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9bbcb0dd38aa1d44bdf1a085b0bd3a05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">officetechsupport</media:title>
		</media:content>

		<media:content url="http://officetechsupport.files.wordpress.com/2010/07/slip-filter.png?w=300" medium="image">
			<media:title type="html">Slip-Filter</media:title>
		</media:content>
	</item>
		<item>
		<title>MS Project Show Only Summary Bars</title>
		<link>http://officetechsupport.wordpress.com/2010/07/15/ms-project-show-only-summary-bars/</link>
		<comments>http://officetechsupport.wordpress.com/2010/07/15/ms-project-show-only-summary-bars/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 06:29:08 +0000</pubDate>
		<dc:creator>Trevor Lowing, PMP</dc:creator>
				<category><![CDATA[Microsoft Project]]></category>

		<guid isPermaLink="false">http://officetechsupport.wordpress.com/?p=58</guid>
		<description><![CDATA[One question I&#8217;m frequently asked is how to display only summary bars in the MS Project GanTT view. If you collapse all the summary bars manually then you can&#8217;t see summary bars beneath other summary bars. So to see ALL of the summary bars I created the following little macro. Sub Show_Summary_Bars() 'set the flag [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=58&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One question I&#8217;m frequently asked is how to display only summary bars in the MS Project GanTT view.  If you collapse all the summary bars manually then you can&#8217;t see summary bars beneath other summary bars. So to see ALL of the summary bars I created the following little macro. </p>
<p><code>Sub Show_Summary_Bars()<br />
'set the flag field for the selected tasks<br />
    Dim oTasks As Tasks<br />
    Dim oTask As Task<br />
    Set oTasks = ActiveProject.Tasks<br />
    For Each oTask In oTasks</p>
<p>        If Not oTask Is Nothing Then</p>
<p>            oTask.Flag1 = "No"</p>
<p>            If oTask.Rollup = True Or oTask.Summary = True Then<br />
                oTask.Flag1 = "Yes"<br />
            End If</p>
<p>        End If<br />
    Next oTask</p>
<p>    'filter to show just the selected tasks<br />
    FilterEdit Name:="SummaryBars", TaskFilter:=True, Create:=True, OverwriteExisting:=True, FieldName:="Flag1", Test:="equals", Value:="Yes", ShowInMenu:=False, ShowSummaryTasks:=False<br />
    FilterApply Name:="SummaryBars"</p>
<p>End Sub</code><br />
Cheers,</p>
<p>Trevor Lowing<br />
Office Tech Support</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/officetechsupport.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/officetechsupport.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/officetechsupport.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/officetechsupport.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/officetechsupport.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/officetechsupport.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/officetechsupport.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/officetechsupport.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/officetechsupport.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/officetechsupport.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/officetechsupport.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/officetechsupport.wordpress.com/58/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/officetechsupport.wordpress.com/58/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/officetechsupport.wordpress.com/58/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=58&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://officetechsupport.wordpress.com/2010/07/15/ms-project-show-only-summary-bars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9bbcb0dd38aa1d44bdf1a085b0bd3a05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">officetechsupport</media:title>
		</media:content>
	</item>
		<item>
		<title>MS Project Automated Date Preservation/Archiving</title>
		<link>http://officetechsupport.wordpress.com/2010/07/11/ms-project-automated-baseline-preservation/</link>
		<comments>http://officetechsupport.wordpress.com/2010/07/11/ms-project-automated-baseline-preservation/#comments</comments>
		<pubDate>Sun, 11 Jul 2010 06:05:14 +0000</pubDate>
		<dc:creator>Trevor Lowing, PMP</dc:creator>
				<category><![CDATA[Microsoft Project]]></category>

		<guid isPermaLink="false">http://officetechsupport.wordpress.com/?p=50</guid>
		<description><![CDATA[Once a Project base been baselined we have to be concerned with change management. Your business process may address the preservation of baseline dates, but how to you preserve schedule forcast dates at various times in the project execution? Below is one possability. Utilize the extra baseline fields to preserve forecast dates (start/finish, duration, etc) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=50&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Once a Project base been baselined we have to be concerned with change management.  Your business process may address the preservation of baseline dates, but how to you preserve schedule forcast dates at various times in the project execution?  Below is one possability. Utilize the extra baseline fields to preserve forecast dates (start/finish, duration, etc) on a routine basis so analysis and ad-hoc reporting can be done. The macro below accomplishes automated forcast preservation.  Actuate this macro manually, via a button or attahc it to the OnSave event.</p>
<p>This macro works like this:</p>
<p>If a new quarter starts, prompts the user to save the dates to the appropriate baseline.  IF a new month stats, prompts the user to save to Basekine 5.  If a new two week period starts, prompts the user to save to  Baseline6.  If the user isn’t ready to save the baseline for that quarter or month then will they be able to make changes, save the file, re-open and then save to the appropriate baseline?</p>
<p>    &#8216;Baseline 1 = Q1<br />
    &#8216;Baseline 2 = Q2<br />
    &#8216;Baseline 3 = Q3<br />
    &#8216;Baseline 4 = Q4<br />
    &#8216;Baseline 5 = last 2 weeks<br />
    &#8216;Baseline 6 = last month</p>
<p>Add this code to a project using Tools-&gt;Macro-&gt;Visual Basic Editor</p>
<p>Paste into ThisProject</p>
<p>Cheers,</p>
<p>Trevor Lowing<br />
Office Tech Support</p>
<p><code>‘========== START CODE =======================</p>
<p>Option Explicit</p>
<p>Function Archive()<br />
    On Error GoTo UnexpectedError<br />
    Dim archiveInfo As String<br />
    'Data storage format<br />
    'used the project's status field to store last archived dates then uses these baselines<br />
    'Baseline 1 = Q1<br />
    'Baseline 2 = Q2<br />
    'Baseline 3 = Q3<br />
    'Baseline 4 = Q4<br />
    'Baseline 5 = last 2 weeks<br />
    'Baseline 6 = last month<br />
    '</p>
<p>    'ActiveProject.Subject = "Last Archived Dates (Qtr : Month : BiWeekly) :12/12/2010:12/12/2010:12/12/2010"<br />
    archiveInfo = ActiveProject.Subject</p>
<p>    Dim arrDates<br />
    Dim currentDate, dtmQ, dtmM, dtmB As Date</p>
<p>    currentDate = ActiveProject.StatusDate<br />
    'make sure th status date is set, if not then default to today<br />
    If Not IsDate(ActiveProject.StatusDate) Then<br />
        currentDate = Date<br />
    Else<br />
        currentDate = ActiveProject.StatusDate<br />
    End If</p>
<p>    arrDates = Split(archiveInfo, ":")</p>
<p>    '<br />
    If UBound(arrDates) &gt; 0 Then<br />
        If IsDate(arrDates(3)) Then<br />
            dtmQ = DateValue(arrDates(3))<br />
        End If<br />
        If IsDate(arrDates(4)) Then<br />
            dtmM = DateValue(arrDates(4))<br />
        End If<br />
        If IsDate(arrDates(5)) Then<br />
            dtmB = DateValue(arrDates(5))<br />
        End If<br />
    End If</p>
<p>    ' identify the current status fiscal quarter, then identify if we need to archive</p>
<p>    Dim a As Integer</p>
<p>    'If the quarter has changed or it's been longer than 100 days<br />
    If (FiscalQuarter(dtmQ)  FiscalQuarter(currentDate)) Or (DateDiff("d", dtmQ, currentDate) &gt; 100) Then<br />
        'see if we want to archive<br />
        a = MsgBox("A new fiscal quarter has begun(qtr " &amp; FiscalQuarter(currentDate) &amp; "), commence archive to Baseline" &amp; FiscalQuarter(currentDate) &amp; "?", vbYesNo)<br />
        If a = vbYes Then<br />
            Select Case FiscalQuarter(currentDate)<br />
            Case 1<br />
                BaselineSave All:=True, Copy:=0, Into:=11<br />
            Case 2<br />
                BaselineSave All:=True, Copy:=0, Into:=12<br />
            Case 3<br />
                BaselineSave All:=True, Copy:=0, Into:=13<br />
            Case 4<br />
                BaselineSave All:=True, Copy:=0, Into:=14<br />
            Case Else<br />
            End Select</p>
<p>            dtmQ = currentDate<br />
        End If<br />
    End If<br />
    'if the month has changed or it's been more than 63 days<br />
    If (Month(dtmM)  Month(currentDate)) Or (DateDiff("d", dtmQ, currentDate) &gt; 63) Then<br />
        'see if we want to archive<br />
        a = MsgBox("A new month has begun, commence archive to Baseline5?", vbYesNo)<br />
        If a = vbYes Then<br />
            BaselineSave All:=True, Copy:=0, Into:=15<br />
            dtmM = currentDate<br />
        End If<br />
    End If</p>
<p>    'if it's been more than 14 days<br />
    If DateDiff("d", dtmB, currentDate) &gt; 14 Then<br />
        'see if we want to archive<br />
        a = MsgBox("A new two-week period has begun, commence archive to Baseline6?", vbYesNo)<br />
        If a = vbYes Then<br />
            MsgBox "hello"<br />
            BaselineSave All:=True, Copy:=0, Into:=16<br />
            dtmB = currentDate<br />
        End If<br />
    End If</p>
<p>    'archive schedule preservation dates in the project's "status" field<br />
    ActiveProject.Subject = "Last Archived Dates (Qtr : Month : BiWeekly) :" &amp; dtmQ &amp; ":" &amp; dtmM &amp; ":" &amp; dtmB</p>
<p>    Exit Function<br />
UnexpectedError:<br />
    ' Describe the error to the user.<br />
    MsgBox "Send this message to Trevor Lowing: Unexpected error" &amp; _<br />
           Str$(Err.Number) &amp; _<br />
         " in subroutine DoSomething." &amp; _<br />
           vbCrLf &amp; _<br />
           Err.Description<br />
    Exit Function<br />
End Function</p>
<p>Function FiscalQuarter(dtmIn) As Integer</p>
<p>    Select Case Month(dtmIn)<br />
    Case 10, 11, 12<br />
        FiscalQuarter = 1<br />
    Case 1, 2, 3<br />
        FiscalQuarter = 2<br />
    Case 4, 5, 6<br />
        FiscalQuarter = 3<br />
    Case 7, 8, 9<br />
        FiscalQuarter = 4<br />
    Case Else<br />
        FiscalQuarter = 0<br />
    End Select<br />
End Function</p>
<p>Private Sub Project_BeforeSave(ByVal pj As MSProject.Project)<br />
    Call Archive<br />
End Sub</p>
<p>‘==========FINISH CODE =======================</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/officetechsupport.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/officetechsupport.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/officetechsupport.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/officetechsupport.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/officetechsupport.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/officetechsupport.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/officetechsupport.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/officetechsupport.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/officetechsupport.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/officetechsupport.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/officetechsupport.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/officetechsupport.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/officetechsupport.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/officetechsupport.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=50&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://officetechsupport.wordpress.com/2010/07/11/ms-project-automated-baseline-preservation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9bbcb0dd38aa1d44bdf1a085b0bd3a05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">officetechsupport</media:title>
		</media:content>
	</item>
		<item>
		<title>Calculate Next Friday or Next Saturday in VB</title>
		<link>http://officetechsupport.wordpress.com/2010/06/18/16/</link>
		<comments>http://officetechsupport.wordpress.com/2010/06/18/16/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 06:47:47 +0000</pubDate>
		<dc:creator>Trevor Lowing, PMP</dc:creator>
				<category><![CDATA[Microsoft Access]]></category>
		<category><![CDATA[Microsoft Excel]]></category>
		<category><![CDATA[Microsoft Project]]></category>

		<guid isPermaLink="false">http://officetechsupport.wordpress.com/?p=16</guid>
		<description><![CDATA[For standard reporting I&#8217;m often confronted with querying for data up to a future or past date that falls on Friday or Saturday so I created the following functions. DayCount is the number of days in the past or future to project the date from. Use a negative value to get those dates in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=16&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For standard reporting I&#8217;m often confronted with querying for data up to a future or past date that falls on Friday or Saturday so I created the following functions. DayCount is the number of days in the past or future to project the date from.  Use a negative value to get those dates in the past.</p>
<p><code>Function FutureSaturday(ByVal DayCount As Integer) As Date<br />
    Dim newdate As Date<br />
    newdate = Date + DayCount<br />
    FutureSaturday = newdate + (7 - DatePart("w", newdate))<br />
End Function</p>
<p>Function FutureFriday(ByVal DayCount As Integer) As Date<br />
    Dim newdate As Date<br />
    newdate = Date + DayCount<br />
    FutureFriday = newdate + (6 - DatePart("w", newdate))<br />
End Function</code></p>
<p>Cheers,</p>
<p>Trevor Lowing<br />
Office Tech Support</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/officetechsupport.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/officetechsupport.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/officetechsupport.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/officetechsupport.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/officetechsupport.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/officetechsupport.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/officetechsupport.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/officetechsupport.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/officetechsupport.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/officetechsupport.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/officetechsupport.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/officetechsupport.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/officetechsupport.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/officetechsupport.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=officetechsupport.wordpress.com&amp;blog=12483600&amp;post=16&amp;subd=officetechsupport&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://officetechsupport.wordpress.com/2010/06/18/16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9bbcb0dd38aa1d44bdf1a085b0bd3a05?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">officetechsupport</media:title>
		</media:content>
	</item>
	</channel>
</rss>
