Microsoft KB Archive/111892

From BetaArchive Wiki

Project: Can’t Run PROJXTAB.XLM Macro File

PSS ID Number: Q111892 Article last modified on 11-16-1994

3.00 3.00a

WINDOWS

The information in this article applies to:
- Microsoft Project for Windows, versions 3.0 and 3.0a - Microsoft Excel for Windows, versions 3.0a, 4.0, 4.0a, and 5.0

SUMMARY

When you run the Microsoft Excel PROJXTAB.XLM sample macro that ships with Microsoft Project, you may receive an error and the macro will halt.

NOTE: The PROJXTAB.XLM macro is supplied as a sample only. Its intent is to show, by example, how a Microsoft Excel macro can use DDE channels to communicate with Microsoft Project.

The PROJXTAB.XLM macro, which creates a crosstab report, is intended to run well on small projects only. You may encounter problems if you attempt to run this macro with large projects, projects with long task or resource names, or projects that span several years.

WORKAROUND

Microsoft provides macro examples 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. This macro is provided ‘as is’ and Microsoft does not guarantee that the following code can be used in all situations. Microsoft does not support modifications of the code to suit customer requirements for a particular purpose.

The following changes should allow the macro to run successfully for many projects (for both the Task By Resource and Resources By Task options).

In this cell Make the following change ———————————————-

B2: MacroSheet=“PROJXTAB.XLM”

B22: =TEXT.BOX(“Task/Resource Cross Tab Report”)

B54: =EXECUTE(DDEChannel,“Alerts .Show=[No]”)

B119: =SET.NAME(“ProjResIDs”,REQUEST(DDEChannel,"2 (*“&ListSep&”(ID“&LisSep&”Name))"))

B120: Rows=5

B125: =SET.NAME(“Rows”,Rows+1)

B128: =SET.NAME(“Rows”,Rows+1)

B131: =SET.NAME(“Rows”,Rows+1)

B135: =SET.NAME(“Rows”,Rows-1)

B150: =EXECUTE(DDEChannel,“EditGoto”&INDEX(ProjResIDs,count,1))

B172: =SET.NAME(“ProjTaskIDs”,REQUEST(DDEChannel,"T(*“&ListSep&” (ID“&ListSep&”Name))"))

B197: =EXECUTE(DDEChannel,“EditGoto”&INDEX(ProjTaskIDs,count,1))

B204: =EXECUTE(DDEChannel,“EditGoto”&INDEX(res_tasks,count2,2))

KBCategory: kbusage KBSubcategory:

Additional reference words: 3.00 3.00a 4.00 4.00a 5.00

Copyright Microsoft Corporation 1994.