PRJ98: Unit of Time Included when Pasting Timescaled Work

ID: Q175008

The information in this article applies to:

SYMPTOMS

In Microsoft Project 98, if you copy timescaled work information from either the Task Usage or Resource Usage view into Microsoft Excel, the information that is pasted into the other application includes the unit of time (for example, minutes, hours, days, weeks).

WORKAROUND

To work around this behavior, use either of the following methods:

Method 1: Run the Analyze_TimeScaled_Data macro

To export the timescaled data to Microsoft Excel without the unit of time, run the Analyze_TimeScaled_Data macro. This macro will export cost, work, and earned value to Microsoft Excel. The macro will prompt you to select the data, the timeframe, and the time you want to export. To run this macro, follow these steps:

1. On the Tools menu, point to Macro, and then click Macros.

2. In the Macro Name list, select the Analyze_TimeScaled_Data macro and click

   Run.

Method 2: Paste the information in Microsoft Excel and run a custom macro

Microsoft provides examples of Visual Basic for Applications procedures for illustration only, without warranty either expressed or implied, including, but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. The Visual Basic procedures in this article are provided 'as is' and Microsoft does not guarantee that they can be used in all situations. While Microsoft Support professionals can help explain the functionality of a particular macro, they will not modify these examples to provide added functionality, nor will they help you construct macros to meet your specific needs. If you have limited programming experience, you may want to consult one of the Microsoft Solution Providers. Solution Providers offer a wide range of fee-based services, including creating custom macros. For more information about Microsoft Solution Providers, call Microsoft Customer Information Service at (800) 426-9400.

Paste the values into Microsoft Excel and then remove the unit of time programmatically.

1. Open a module sheet in the Microsoft Excel workbook where you pasted the data

   and then enter the following code:

      Sub DeleteUnits()
         s = Selection.Address
         For Each r In ActiveSheet.Range(s)
            If Len(r.Value) > 0 Then
               r.Value = Val(Left(r.Value, Len(r.Value) - 1))
            End If
         Next
      End Sub

2. Run the macro while the sheet where you pasted the data is visible. The time
   units will be removed.

STATUS

Microsoft has confirmed this to be a problem in the versions of Microsoft Project listed above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional Query words: vb vba vbe

Keywords          : kbcode kbprg 
Version           : WINDOWS:98
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbbug
Solution Type     : kbpending

Last Reviewed: May 19, 1999