Click to See Complete Forum and Search --> : Public Enum is not accepted in code
Steve Thomas
Nov 29th, 1999, 12:14 AM
I pulled this statement off of a web site and am trying to get it to work in my code. I am running VB4. I don't know what I am doing wrong. I have tried changing public to private, etc but no luck.
Public ENUM FO_Functions
FO_MOVE = &H1
FO_COPY = &H2
FO_DELETE = &H3
FO_RENAME = &H4
End ENUM
MartinLiss
Nov 29th, 1999, 12:23 AM
Does VB4 support enums? You can find out by looking in Help for that keyword in the index. If you find it there, you will also probably find the answer to your problem, and if you don't then it's not supported.
------------------
Marty
Steve Thomas
Nov 29th, 1999, 12:27 AM
I looked in help but it is not found. That is why I posted the Question. Sounds like I can't use this code. Thanks
Serge
Nov 29th, 1999, 12:29 AM
Enums were supported since VB5, so if you use VB4 and earlier then you can't use them.
------------------
Serge
Software Developer
Serge_Dymkov@vertexinc.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)
c@lle
Nov 29th, 1999, 01:30 PM
Simply drop the enum thing and make constantst of the rest.
const FO_MOVE = &H1
const FO_COPY = &H2
const FO_DELETE = &H3
const FO_RENAME = &H4
Then you replace in your code every 'as FO_Functions' with 'as Variant' or even 'as integer'.
The only thing that changes is when you are coding, you don't get a list where you can choose from (the enum list), but you have to use one of the constants.
[This message has been edited by c@lle (edited 11-30-1999).]
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.