Why isn't Enum returning correct value?

You can of course see the pattern right?
It's giving pBookType a default value of 1 and concatenating the value to the one on the RHS if a fully qualified reference to the Enum is not given.

Can you upload the class and the module?
 
I FOUND IT! I was about to start pulling my hair out.

In the calling module (main module) I had set a Private Const BOLTS as Integer = 11 and another Private Const ANCHORS as Integer = 12

So when the main module tried to set the property the main module's const were over riding the class' ENUM. Hmm.

So to deliniate the main mondule's Const from the class' ENUM it had to be a fully qualified pass in. Therefore, BookType.Bolts or BookType.Anchors.

It makes perfect sense now.
 
Yep, it was simply returning the const values. At least you know now to always fully qualify ;)
 

Users who are viewing this thread

Back
Top Bottom