+ Reply to Thread
Results 1 to 3 of 3

Cancel install of Add-In if requirements not met

  1. #1
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Cancel install of Add-In if requirements not met

    Suppose I have created an Add-In that needs certain requirements met before it can be used. (e.g. say it needs to be run in Excel 2007 or higher or say it needs access to the VBA Project Object Model)

    When the end user goes to install this add-in, I want the following to happen:
    1. Check what requirements have been set for this workbook
    2. Check if the users environment meets all requirements set
    3. If fail any of the above requirements, alert the end user by means of a message box
    4. Unload the Add-In (i.e. the AddIns manager shows it unticked)

    Would anybody be able to assist with this project?

    So far I have achieved points 1-3 (although I think it may be firing by WB open event not WB install)
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  2. #2
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Cancel install of Add-In if requirements not met

    In the hope of improving responses on this thread, I am uploading a test workbook. It is very much an experimental work in progress so please keep that in mind when viewing the code.

    I'll probably regret uploading this as a quick skim of the code will probably turn off 99% of programmers. I apologise that the code isn't easy to follow. It's currently very tangled as I am striving to consolidate multiple workbook Open/Save concepts into one integrated whole. (e.g. install add-in by double clicking, force users to enable macros, Version updater etcetcera - for more detail see the comments in the module "tx_TWB_events_150204" ) (My goal is that once these are all successfully integrated, each one can be turned on/off to suit your projects needs)



    To test the workbook:
    1. Alter the tool requirements (module = "usr_ThisTool_Reqs_150203") so that at least one of them doesn't meet your set-up/environment. (Personally I've been turning the "mblncREQUIRES_EXCEL_VBP_ACCESS" to True)
    2. Save the XLSM as an XLAM
    3. Close the XLSM. Close Excel
    4. Now try to install the XLAM. Test any (or all) methods of installing e.g. 1) double click on the XLAM 2) Copy the XLAM to your UserLibraryPath before opening Excel then try ticking in the Add-Ins manager 3) Use the Add-Ins Manager to browse to the XLAM

    I can get the XLSM to close if conditions are not met but I fail to untick the XLAM if conditions are not met.
    Attached Files Attached Files
    Last edited by mc84excel; 02-04-2015 at 07:01 PM.

  3. #3
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Cancel install of Add-In if requirements not met

    [Bump]

    Anyone here deploy add-ins to multiple end users? Any suggestion on how to unload the Add-In if the environment settings dont meet the Add-Ins requirements?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 11-28-2014, 07:09 AM
  2. [SOLVED] Disabling 'Cancel' option when saving work (Yes/No/Cancel)
    By jsmarsha@wisc.edu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-11-2006, 04:35 PM
  3. [SOLVED] Cancel Addin Install from Workbook_AddinInstall?
    By Dave Ramage in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-28-2006, 09:10 AM
  4. Replies: 1
    Last Post: 01-08-2006, 05:40 PM
  5. Cancel Macro is user selects 'cancel' at save menu
    By Mark in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2005, 01:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1