PaulMcCulloh
Programmer
Hello,
How do you Hide a method and assign a ProcedureID in VBA?
Since VBA does not provide the Procedure Attributes dialog, what code is used to HIDE the NewEnum method and assign it the ProcedureID of -4 that For Each...Next requires to work?
I am trying to enable For Each...Next in a Collection Class. The VB6 Programmer's Guide says that "for your collection classes to work with For Each...Next, you must provide a hidden NewEnum method with the correct ProcedureID."
I've got the NewEnum method part, which returns the Collection object's enumerator.
A guess for the HIDE code is to export the module to a text editor, place the following line as the second line of the method, and then reimport it:
Attribute VB_Exposed = False
however, this is just a guess and I don't know if this is correct.
As far as code to set the ProcedureID to be -4, I have no idea how to do that!
Can you help? Thanks much!!!
How do you Hide a method and assign a ProcedureID in VBA?
Since VBA does not provide the Procedure Attributes dialog, what code is used to HIDE the NewEnum method and assign it the ProcedureID of -4 that For Each...Next requires to work?
I am trying to enable For Each...Next in a Collection Class. The VB6 Programmer's Guide says that "for your collection classes to work with For Each...Next, you must provide a hidden NewEnum method with the correct ProcedureID."
I've got the NewEnum method part, which returns the Collection object's enumerator.
A guess for the HIDE code is to export the module to a text editor, place the following line as the second line of the method, and then reimport it:
Attribute VB_Exposed = False
however, this is just a guess and I don't know if this is correct.
As far as code to set the ProcedureID to be -4, I have no idea how to do that!
Can you help? Thanks much!!!