-
1
- #1
I have a solution to an old thread (thread710-62825) in case someone is still having this trouble like I was.
The original post was:
---------------------------------------------------------
Galford (Programmer)
I have the following enumeration defined in a class:
'Class module to handle connection to database
Public Enum DBLoc
DBLocal = 1
DBServer = 2
End Enum
From time to time, I'll get a compile error stating Constant Expression Required even though it is defined in the class.
Is this a bug or did I do something wrong? Any help would be appreciated.
Thanks
---------------------------------------------------------
This turned out to be a bug in VB, and I had to search around a bit to get this answer.
1. Put the cursor on the highlighted value
2. Type Shift - f2.
3. On the enum line, put the cursor after 'enum'
4. Type spacebar and then arrow down.
You will have to restart the compile, but it will work again after that.
Thanks to "David Carr" <David_Carr@NoSpamCanada.Com> for providing the answer.
If anyone has a better or more permanent solution for this bug, please let us all know.
Thanks
The original post was:
---------------------------------------------------------
Galford (Programmer)
I have the following enumeration defined in a class:
'Class module to handle connection to database
Public Enum DBLoc
DBLocal = 1
DBServer = 2
End Enum
From time to time, I'll get a compile error stating Constant Expression Required even though it is defined in the class.
Is this a bug or did I do something wrong? Any help would be appreciated.
Thanks
---------------------------------------------------------
This turned out to be a bug in VB, and I had to search around a bit to get this answer.
1. Put the cursor on the highlighted value
2. Type Shift - f2.
3. On the enum line, put the cursor after 'enum'
4. Type spacebar and then arrow down.
You will have to restart the compile, but it will work again after that.
Thanks to "David Carr" <David_Carr@NoSpamCanada.Com> for providing the answer.
If anyone has a better or more permanent solution for this bug, please let us all know.
Thanks