One would think that the "Option Explicit" statement raises an error from a duplicate function name. It does not seem to do so, however, e.g., with the code below. Instead, the last function defined is the one run. On the other hand, a duplicate "Dim" statement results in a "name redefined" error even without "Option Explicit." The suggestion is still a good one though.

Jamal

Option Explicit

Function Test()
WScript.Echo "Function 1"
End Function

Function Test()
WScript.Echo "Function 2"
End Function

Test

-----Original Message-----
From: Aaron Smith [mailto:[email protected]]
Sent: Monday, May 10, 2010 10:04 PM
To: [email protected]
Subject: Re: xml listview dialog

On 5/10/2010 3:08 PM, Jeff Weiss wrote:

        Function DialogEventHandler(dObj, dEvent, dId, dControl)


Just at first glance, you have this function defined twice. I would strongly recommend adding:

Option Explicit

at the top of your code to weed out these kinds of errors.

Aaron

--
Aaron Smith
Product Support Specialist * Web Development GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
260-489-3671 * gwmicro.com

To insure that you receive proper support, please include all past correspondence (where applicable), and any relevant information pertinent to your situation when submitting a problem report to the GW Micro Technical Support Team.

Reply via email to