ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   .EnableSelection = xlUnlockedCells (https://www.excelbanter.com/excel-programming/297825-enableselection-%3D-xlunlockedcells.html)

Stuart[_5_]

.EnableSelection = xlUnlockedCells
 
If I remember correctly, this setting is not preserved when the workbook
is re-opened.
So far I've managed to keep code out of my users' workbooks, so they
do not see the macro warning message. I'd like to continue that if at all
possible.
I could use code in the addin for when the user opens the book via the
addin's menu, but this wouldn't stop them using Excel's file open method.
Besides which, much of the user's Excel work is done outside of the addin,
so I don't want to disable FileOpen for their 'normal' usage.

One thought....If I could 'tag' appropriate workbooks somehow, is there
a way to to get Excel's FileOpen to check for that tag, and if it exists
then EnableSelection=xlUnlockedCells. Probably not, but I think that's
what I need to achieve.

Would be grateful for advice, please.

Regards.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.679 / Virus Database: 441 - Release Date: 07/05/2004



Jim Rech

.EnableSelection = xlUnlockedCells
 
If you're using Excel 2002 or 2003 you can set Enable Selection to unlocked
cells only through the user interface (Tools, Protection) and it will stick
when the workbook is re-opened. Beyond that it's like you said - you have
to run code.

--
Jim Rech
Excel MVP
"Stuart" wrote in message
...
| If I remember correctly, this setting is not preserved when the workbook
| is re-opened.
| So far I've managed to keep code out of my users' workbooks, so they
| do not see the macro warning message. I'd like to continue that if at all
| possible.
| I could use code in the addin for when the user opens the book via the
| addin's menu, but this wouldn't stop them using Excel's file open method.
| Besides which, much of the user's Excel work is done outside of the addin,
| so I don't want to disable FileOpen for their 'normal' usage.
|
| One thought....If I could 'tag' appropriate workbooks somehow, is there
| a way to to get Excel's FileOpen to check for that tag, and if it exists
| then EnableSelection=xlUnlockedCells. Probably not, but I think that's
| what I need to achieve.
|
| Would be grateful for advice, please.
|
| Regards.
|
|
|
| ---
| Outgoing mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.679 / Virus Database: 441 - Release Date: 07/05/2004
|
|



Stuart[_5_]

.EnableSelection = xlUnlockedCells
 
Thanks. If you will advise further, I'd be grateful.

With Excel 2000, a workbook is protected and saved
under an addin. If the workbook is opened under the
addin, then code can reset EnableSelection. Ok.

Without code in that workbook's ThisWorkbook
module, can I trap user opening the file via Excel's
FileOpen menu, and then reset EnableSelection?

Regards and thanks.

"Jim Rech" wrote in message
...
If you're using Excel 2002 or 2003 you can set Enable Selection to

unlocked
cells only through the user interface (Tools, Protection) and it will

stick
when the workbook is re-opened. Beyond that it's like you said - you have
to run code.

--
Jim Rech
Excel MVP
"Stuart" wrote in message
...
| If I remember correctly, this setting is not preserved when the workbook
| is re-opened.
| So far I've managed to keep code out of my users' workbooks, so they
| do not see the macro warning message. I'd like to continue that if at

all
| possible.
| I could use code in the addin for when the user opens the book via the
| addin's menu, but this wouldn't stop them using Excel's file open

method.
| Besides which, much of the user's Excel work is done outside of the

addin,
| so I don't want to disable FileOpen for their 'normal' usage.
|
| One thought....If I could 'tag' appropriate workbooks somehow, is there
| a way to to get Excel's FileOpen to check for that tag, and if it

exists
| then EnableSelection=xlUnlockedCells. Probably not, but I think that's
| what I need to achieve.
|
| Would be grateful for advice, please.
|
| Regards.
|
|
|
| ---
| Outgoing mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.679 / Virus Database: 441 - Release Date: 07/05/2004
|
|




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.679 / Virus Database: 441 - Release Date: 07/05/2004



Jim Rech

.EnableSelection = xlUnlockedCells
 
Without code in that workbook's ThisWorkbook module, can I trap user
opening the file via Excel's

FileOpen menu, and then reset EnableSelection?

I believe you can by creating an application level event handler in the
add-in. This article describes how to do it:

http://support.microsoft.com/default...66&Product=xlw

Chip Pearson also has a page on this topic:

http://www.cpearson.com/excel/AppEvent.htm

--
Jim Rech
Excel MVP




All times are GMT +1. The time now is 01:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com