Illegal Operation Using Function Instead of Sub In Macro (163823)



The information in this article applies to:

  • Microsoft Project for Windows 95 4.1
  • Microsoft Project for Windows 95 4.1a

This article was previously published under Q163823

SYMPTOMS

When you run a macro that uses a function instead of a subroutine, you receive an error message indicating an illegal page fault or an exception error, such as the following:
WINPROJ caused an exception c0000026H in module KERNEL32.DLL at 0137:bff85f2a.

WORKAROUND

Use a Sub statement instead of a Function statement. For example, change this code:
   Function test()
   <your code here>
   End Function
				
to this code:
   Sub Test()
   <your code here>
   End Sub
				

STATUS

Microsoft has confirmed this to be a problem in the products listed at the beginning of this article. We are researching this problem and will post additional information here in the Microsoft Knowledge base as it becomes available.

Modification Type:MajorLast Reviewed:9/26/2003
Keywords:KB163823