> Sorry, my fault. I wasn't aware that unlocked cells cannot be formatted when
> the sheet is locked. I can understand your frustration, but that seems to be
[quoted text clipped - 47 lines]
> Now I hope you got my problem. expect for your answer.
> Best wishes!
> > <fujing1...@gmail.com> wrote in message
>
[quoted text clipped - 5 lines]
> > > cells.
> > > could we turn it true without using vba?
> <fujing1...@gmail.com> wrote in message
>
[quoted text clipped - 4 lines]
> > do anything.
> > Joerg
> @ Joerg
> Thanks very much for your answer. but I don't get the answer I want.
[quoted text clipped - 13 lines]
> Now I hope you got my problem. expect for your answer.
> Best wishes!
On 2$B7n(B8$BF|(B, $B2<8a(B5?36$BJ,(B, "Joerg" <n...@email.address> wrote:
> Sorry, my fault. I wasn't aware that unlocked cells cannot be formatted when
> the sheet is locked. I can understand your frustration, but that seems to be
[quoted text clipped - 9 lines]
>
> Joerg
@ Joerg
Thank you very much for you rapid answer. the problem has puzzled me a
long time . the solution you gave above(to uncheck "Select> locked
cells" and to check "Format cells") has been thought by us already.
But we don't want to take it. we should allow user to select the
locked.
and as you know we could write code in worksheet_selectionchange
event to solve this problem,but it'll cost application's resource.
We want to find out a method that could achieve what we ask and won't
cost application's resource.
Thank you again for you kind-hearted help!
Best wishes!
Yours,fujing1003
@fujing1003
Now your problem puzzles me as well...
I don't know what exactly you want your users to format. Normally password
protected sheets should require little formatting - if any - by the users,
so if the formatting options required are limited, you could try conditional
formatting (at least that works in password protected sheets).
Another clunky solution: You could provide preformatted "master cells",
which the user could copy to the target cells, thus applying the formats
needed. And this reveals a big and dangerous unconsistency of Excels
protection philosophy: While direct formatting is not possible, copying the
formats from other cells is. So even if a user might just want to copy a
value from another cell, he in fact copies the underlying formats,
conditional formats and data entry rules as well. Now THIS should be
prohibited, but isn't.
As for the code: If worksheet_selectionchange is too "heavy", because it
fires every time the selection changes, there are other possibilities. The
easiest I can think of: Allow formatting also for locked cells (what harm
can the users do if they can't change values?) and then use the
Workbook_BeforeSave event to reset the formats of the locked cells (you
could copy them from a hidden template sheet).
Good luck,
Joerg
fujing1003 - 13 Feb 2007 09:06 GMT
@Joerg
Thanks again for your kind-hearted help.
Maybe I need to change my request. Because it nearly can't reach the
destination directly by excel's protection system. and It's hard to
find a balance between performance and efficiency by VBA.
Best wishes!
yours fujing
Joerg - 13 Feb 2007 09:21 GMT
> @Joerg
> Thanks again for your kind-hearted help.
[quoted text clipped - 3 lines]
> Best wishes!
> yours fujing
Good luck!
Joerg