I am looking to either prevent a workbook from opening, or forcing a close, if a required add-in is not installed on the user's computer. I have a series of workbooks that contain data, and all their functionality is controlled from an add-in.

I have tried to place the following code in several different routines, including Workbook_Open, Workbook_Activate, and in other modules where it is triggered by an event or command button. I continually get a run-time error 1004 when it tries to close the workbook. The following code does a good job of recognizing when the add-in is installed or not. The trouble I am having is focused solely on forcing a close.

'check for add-in
    If AddIns("Cbbs_Admin").Installed Then
        MsgBox "Your add-in is installed."
    Else
        MsgBox "Your add-in is NOT installed, and this file cannot operate without it.  Please install the add-in before trying to use this file.  This file will now close."
        ActiveWorkbook.Close False                    'close without saving if Add-in is not installed or accessible.
    End If
Instead of ActiveWorkbook.Close I have also tried ThisWorkbook.Close with the same results.

Does anybody have some insight on this? Or previous experience to share? Or other techniques to consider for disabling the file?

Thanks!