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