Results 1 to 2 of 2

Thread: To many if ands or buts .

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2000
    Posts
    258

    Talking

    Is there a better way for this ?

    GB is GlobalBoolean
    cst is an integer constant
    [Code]
    '********************************************
    ' - This checks the varibles and creates a number
    ' - according to the logging options
    ' - Returns 999 if Error
    '********************************************
    Public Function GetLoggingStyle() As Long
    Dim Style%
    '
    On Error GoTo ErrorHandle
    '
    Style = 0
    '
    If GB_LoggingAll = True Then Style% = Style% + cstLogALL
    If GB_LoggingChat = True Then Style% = Style% + cstLogChat
    If GB_LoggingFiles = True Then Style% = Style% + cstLogFiles
    If GB_LoggingPrivateMessages = True Then Style% = Style% + cstLogPrivateMessages
    If GB_LoggingErrors = True Then Style% = Style% + cstLogErrors
    If GB_LoggingServer = True Then Style% = Style% + cstLogServer
    '
    GetLoggingStyle = Style%
    '
    ErrorHandle: GetLoggingStyle = 999
    End Function
    [Code]

    Thanks again ,

    []Private
    Visual Basic 6 SP4 on win98se

    QUIT THE RAT RACE BECAUSE YOUR MESSING THE WORLD UP !!!!!

  2. #2
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    The code looks OK. What are you trying to do, maybe then someone can suggest something.

    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

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