Set Obj as Class - Check to see if Class is active

I am creating a Class Module and I need to determine if the Class is currently active.  what is the proper syntax to determine this?  My Current attempt does not like the ".ISOpen"

Public Function ISCenter_Data_Load_Routine(Optional ByVal ReportName As String, _
                                            Optional ByVal MODName As String, _
                                            Optional ByVal recct As Long, _
                                            Optional ByVal ProcName As String, _
                                            Optional ByVal sErr As String) As Boolean

Dim objLog As New clsISCenterEventLogger
   On Error GoTo ISCenter_Data_Load_Routine_Error

    With objLog
        If .IsOpen = True Then
            objLog.OpenLogRecord ReportName:=ReportName, _
                                MODName:=MODName, _
            objLog.CloseLogRecord RowsAffected:=recct, _
                                    ErrMsg:=sErr, _
                                    AdditionalInfo:="Tested using VBA class", _
        End If
    End With
   On Error GoTo 0
   Exit Function


    MsgBox "Error " & Err.Number & " (" & Err.Description & _
        ") in procedure ISCenter_Data_Load_Routine of Module basEventLogger"

End Function

Open in new window

Here is my latest attempt to set the value:

Option Compare Database
Option Explicit

Private mIsOpen As Boolean
Property Get IsOpen() As Boolean
    mIsOpen = True
    IsOpen = mIsOpen
End Property

Open in new window

Karen SchaeferBI ANALYSTAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jeffrey CoachmanMIS LiasonCommented:
What is this "Class" doing?

Is it just used to detect if a particular object is open?

If so, there are simpler ways to do this besides creating a class...
Karen SchaeferBI ANALYSTAuthor Commented:
Is it just used to detect if a particular object is open?


I need to indicate which part of the function should be used depending on which object is open?

here is what I am using found solution elsewhere:

Property Get IsOpen() As Boolean
    IsOpen = IIf(EventID = 0, False, True)
End Property


Jeffrey CoachmanMIS LiasonCommented:
So all is well than?

As I stated, there are many simple "IsOpen" functions available. (less than 5 lines of code)
Just FYI...


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Karen SchaeferBI ANALYSTAuthor Commented:
Thanks for the assistance
Karen SchaeferBI ANALYSTAuthor Commented:
thanks as always.
Jeffrey CoachmanMIS LiasonCommented:
Then if your own post solved the issue , then that is what you should have accepted (not my post)


Karen SchaeferBI ANALYSTAuthor Commented:
I wanted to give you the points for your time.
Jeffrey CoachmanMIS LiasonCommented:

How long have we been working together?

If you answer your own post, then accept your own answer.

Not knowing the full scope of your app or the function, ...My post was just to let you know that there are other ways to detect if an object is open.

My issue with you accepting my post is four-fold
1.  You solved your own issue, you posted the solution, hence you should accept your own post.
2. My post really did not provide any info on the alternate methods, so I will post the popular link here:
3. Other members may be encouraged to see that existing member are so uplifted by the help they get on EE that they get to the point where they can solve there own issues.
4. Although I will fight for points I feel I deserve,  ...I honestly have enough of them.

So if you really want to thank me, just shoot me an email, ...and give yourself some much deserved credit.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.