Pages

Cannot run the macro ‘NvdOnWindow’

Problem Statement

While running nVision reports and drilldowns in 3-tier, when the user attempts to close the parent report instance, they are prompted to save the file even though they have not made any changes to it, and receive an Excel interface exception error:

Excel interface exception SCODE = 0x80010001 error for PeopleSoft nVision Designer (28,160)



When the user clicks Don't Save, they receive the following error

Cannot run the macro 'NvdOnWindow'. The macro may not be available in this workbook or all macros may be disabled. (The user's macro setting is to low: "Enable all macros".



If the user clicks Yes to save the file, the Save As file name is :.xlsx. After substituting acceptable characters for the colon, the user receives the following errors:

Errors were detected while saving 'file path'. Microsoft Excel may be able to save the file by removing or repairing some features. To make the repairs in a new file, click Continue. To cancel saving the file, click Cancel.


Upon clicking Continue, the user receives the following error messages:

The following features cannot be saved in macro-free workbooks:
-          Excel 4.0 function stored in defined names
-          Excel 4.0 Macro Sheets (these will be converted to normal worksheets)



Resolution

Replication of the issue ultimately identified the issue occurred when using a customized Journal Lines drilldown layout.

Forensics indicated that the layout had been cloned, most likely from the delivered JrnlLayout.xnv, and that it had likely been created in Excel 4.

The following points of interest were noted:

-          The setid had not been specified in the Layout Options indicating copying and pasting layout criteria
-          Three defined names in the workbook are not names that are added to layouts with current nVision releases
o   NvsDateToNumber
o   NvsInstCritOpt
o   NvsUpdateOption




I attempted to resolve the issue by making the following changes:
-          Removing the above three highlighted names
-          Specifying SHARE as the default setid under the nVision Layout Options

However, the issue persisted despite these changes.

I then resorted to recreating the drilldown layout from scratch.

Using this new drilldown layout resolved the issue.

Putting together a few hunches, it seems that some layouts that we have date back to Excel 4 based on the error messages. Macros moved to VBA with Excel 5 which came out in 1993. Since Excel 2007, the entire architecture of Excel has changed and it seems that some layouts, this journal lines drilldown layout being one of them, inherited "bad genes" along the way. 

If you are receiving "macro not found" or "macro not accesible" errors like this, you may need to recreate the layout from scratch, particularly if it is a layout that has been upgraded from an early version of Excel (particularly Excel 4 and below) to a new version of Excel.

No comments:

Post a Comment