Disable command bar only in one active workbook

G

Guest

I have a spreadsheet which using Auto_open to display UserForm to allow user
to select data for retrieval.

Would like to prevent users from copying workbook and its macros (using Save
As and Sent To) by disabling the CommandBar for "SaveAs" and "Send To", but
still allow users to cut/paste data when they activate another workbook or
open new workbook.

If I disable CommandBar selection in original workbook, can I automatically
enable them when user activates another Excel spreadsheet? And then disable
them again when user returns to orginal workbook.
 
V

voodooJoe

dave -

in the 'thisworkbook' module - the same place with the open event, you will
find 'workbook_activate' and 'workbook_deactive' events. these should do
what you want.

- voodooJoe
 

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

Top