1
votes

I have a great Monte Carlo simulation macro for MS Project that I use all of the time. Since I upgraded my version of MS Office, it no longer works.

I got the macro from the following link: https://sourceforge.net/projects/montecarloprj/?source=typ_redirect It generates an error (Compile error: User-defined type not defined) at the following line:

Sub SetupExcel(ByRef XlApp As Excel.Application, ByRef XlBook As Excel.Workbook)

Previously, to resolve this issue I needed to enable "Microsoft Excel 12.0 Object Library" in Tools-References in VBA. However, that option (or any Excel Object Library) is not available.

1

1 Answers

0
votes

If you can't find the object library on the list, you can use the Browse button to add it to the list yourself. Find out where the excel.exe file is located and use the Browse... button in the References dialog box. Be sure to change the file type to Executable Files when adding the reference (lower-right corner of the Add Reference dialog box).