Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8930735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:57:44+00:00 2026-06-15T08:57:44+00:00

I am writing a VBA Excel Add-in. When the add-in is active, it defines

  • 0

I am writing a VBA Excel Add-in.
When the add-in is active, it defines some keyboard shortcuts with Application.OnKey. I would like to return these keyboard shortcuts to the default when the add-in closes, and I am using the Auto_Close method inside one of the add-in’s modules for this.
However, I have come across a problem:
When the user opens multiple regular workbooks while my add-in is loaded, and closes just one of them, the Auto_Close on the add-in seems to trigger and turn off the keyboard shortcuts in the other windows.

How can I only trigger an Auto_Close-equivalent when the add-in is completely unloaded (other than completely exiting Excel)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:57:45+00:00Added an answer on June 15, 2026 at 8:57 am

    Try using the Workbook_Open and Workbook_BeforeClose events of the addin. I don’t know why Auto_Close would behave as you describe, but I’m sure the two above will work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an application in VBA for excel. Using some conditions and counting
I am writing a macro in VBA for excel in which I would like
I am writing an add-in for Excel 2003, using VBA. I have an Auto_Open
I am writing a VBA Excel add-in that uses the MSXML2 object to retrieve
I'm having some trouble with syntax options while writing a VBA Macro for Excel.
I'm writing a simple set of modular add-ins in Excel VBA. In Addin1.xlam ,
Once I've finished writing an Excel 2007 VBA script how to I deliver the
I am writing some VBA code which manipulates an HTML document. The document is
I'm a VB/vba coder and would like to start android dev. Currently I'm learning
Say, I'm writing a VBA inside my excel file sample.xls . Now I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.