PRB: Compiler Error Overriding VBA Conversion Functions (191206)



The information in this article applies to:

  • Microsoft Visual Basic Learning Edition for Windows 5.0
  • Microsoft Visual Basic Learning Edition for Windows 6.0
  • Microsoft Visual Basic Professional Edition for Windows 5.0
  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 5.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0

This article was previously published under Q191206

SYMPTOMS

You might receive the following Visual Basic Compiler Error Message when you try to override a VBA Conversion function such as Cdate:
Expected Identifier

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create the following function in Visual Basic:
          Public Function CDate(vExp) as Date
             MsgBox "Won't Compile"
          End Function
    						
  2. Select "Start With Full Compile" from the Run menu.
RESULTS: The compile error "Expected: Identifier" appears. In Visual Basic 6.0, you can override the CVDate function.

Modification Type:MajorLast Reviewed:5/13/2003
Keywords:kbCompiler kberrmsg kbprb KB191206