Results 1 to 5 of 5

Thread: Public Enum is not accepted in code

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    154

    Post

    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

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,175

    Post

    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

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 1999
    Posts
    154

    Post

    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

  4. #4
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    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


  5. #5
    Addicted Member c@lle's Avatar
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    179

    Post

    Simply drop the enum thing and make constantst of the rest.

    Code:
    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).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width