troubleshooting Question

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

Avatar of Karen Schaefer
Karen SchaeferFlag for United States of America asked on
Microsoft OfficeMicrosoft AccessMicrosoft Development
8 Comments1 Solution417 ViewsLast Modified:
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

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
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros