The 'Set appObj = nothing' is in hopes of releasing the reference to access (in DetectAccess 'Set appObj = GetObject(, "Access.Application")'). If GetObject returns err = 0 the reference to the object was retrieved - access is alive.
That was my test if the user had closed it yet.

The 'Count(5)' just goes and counts 5 seconds before returning. Which also has a doevents in the middle of that loop 'cause I'm thinking it's during one of the doevents that access will be closed?