protect add-in after workbook closes

  • Thread starter Thread starter robvan
  • Start date Start date
R

robvan

Hi!

My add-in is password protected. If I open it for editing,
save the changes, close the workbook, when I re-open
the workbook the add-in is still open, i.e. the code still visible.
As I understand it, only by exiting and then re-entering Excel
can you re-enable the add-in password protection.

My question is: is there anyway to close the add-in and re-
institute the password protection when only the workbook
it is attached to is closed (but Excel still running)? I've tried in
Workbook_Close(), but nothing seems to work.

Thanks!
 
I'm confused.....easily done<g>

An Add-in is not attached to a workbook.

An Add-in is a workbook saved as an *.XLA and loaded through Tools>Add-ins or
loaded through workbook_open code in a workbook.

Closing a workbook does not unload the Add-in unless you have code in the
workbook to do so.

The only other ways to close an Add-in is to close Excel or go to
Tools>Add-ins and uncheck the Add-in.

Re-check to load again.

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top