VBA enums give occasional “Constant Expression Required” errors

后端 未结 5 1164
忘掉有多难
忘掉有多难 2020-12-16 11:41

I\'m using an enum defined in a class module in Excel VBA. This has been working fine, but I\'ve started getting a compile error on every time I do a comparison on enum vari

5条回答
  •  醉话见心
    2020-12-16 11:55

    This error does now and then, when no changes were made to the enum or its use or any code related. What worked for me is to make the move the enum from the Class to a Module I have called 'Common' and make the enum Public instead of Private.

提交回复
热议问题