I have a User-Defined type that is declared as Public in a module:
When I define a variable (PublicKey) as Public in a Class module, I get the error:
"Constants, fixed-length strings, arrays, user-defined types and
Declare statements not allowed as Public members of object
modules".
So I moved the definition to the Module as Public. Then I get the error:
"Variable not defined"
When I move the definition back to the Class Module as Private, I get the same error:
"Variable not defined".
Strangely enough, the variable is used in several other routines in the same Class Module without a problem; the difference being that the error occurs in a system call. I can tell that it has something to do with the Function declaration, because VB corrects the capitalization on one, but not the other. eg.
publickey, len(publickey) --> publickey, Len(PublicKey)
The first variable is declared "ByRef As Any" and the second "ByVal As Long". Any suggestions would be appreciated. Before anyone suggests changing the Declare Function, I have been through Hell just to get it to work this way, so that is not an option. I was only cleaning up the code when I ran into this problem.
J.A. Coutts
Code:
Public Type T_DATA
bdata(1 to 276) as Byte
End Type
"Constants, fixed-length strings, arrays, user-defined types and
Declare statements not allowed as Public members of object
modules".
So I moved the definition to the Module as Public. Then I get the error:
"Variable not defined"
When I move the definition back to the Class Module as Private, I get the same error:
"Variable not defined".
Strangely enough, the variable is used in several other routines in the same Class Module without a problem; the difference being that the error occurs in a system call. I can tell that it has something to do with the Function declaration, because VB corrects the capitalization on one, but not the other. eg.
publickey, len(publickey) --> publickey, Len(PublicKey)
The first variable is declared "ByRef As Any" and the second "ByVal As Long". Any suggestions would be appreciated. Before anyone suggests changing the Declare Function, I have been through Hell just to get it to work this way, so that is not an option. I was only cleaning up the code when I ran into this problem.
J.A. Coutts