Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default sheet protection problem

Hi!

On the end of a hot day (30 degrees celcius) it's hard to think properly!!!
:-)

I have a problem, I use the next piece of code

-----------------
ModuleVarious.UnprotectSheet ActiveSheet
If cmt Is Nothing Then
ActiveCell.AddComment Text:=""
End If
ActiveCell.Activate
SendKeys "%ie~" ' opens comment field for editing
ModuleVarious.ProtectSheet ActiveSheet
--------------------

The last line is what I want, but if I implement this, I can't fill in the
Comment field. It just puts a blank commentfield in a cell
Please help me, what can I do to prevent this. Is there for example
something for waiting until the comment field is filled in?

Regards,
Mike


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default sheet protection problem

It might be easier to just protect the worksheet and allow the users to edit the
objects.

In xl2002, I can do Tools|Protection|Protect sheet
and allow all users of this worksheet to:
Edit Objects.

In earlier versions, it's just a checkbox (IIRC).

In code, it would look something like:
ActiveSheet.Protect DrawingObjects:=False


Deer Hunter wrote:

Hi!

On the end of a hot day (30 degrees celcius) it's hard to think properly!!!
:-)

I have a problem, I use the next piece of code

-----------------
ModuleVarious.UnprotectSheet ActiveSheet
If cmt Is Nothing Then
ActiveCell.AddComment Text:=""
End If
ActiveCell.Activate
SendKeys "%ie~" ' opens comment field for editing
ModuleVarious.ProtectSheet ActiveSheet
--------------------

The last line is what I want, but if I implement this, I can't fill in the
Comment field. It just puts a blank commentfield in a cell
Please help me, what can I do to prevent this. Is there for example
something for waiting until the comment field is filled in?

Regards,
Mike


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default sheet protection problem

"Dave Peterson" wrote in message
It might be easier to just protect the worksheet and allow the users to

edit the objects.

No, out of the question! My users can't have that privilege

In code, it would look something like:
ActiveSheet.Protect DrawingObjects:=False


Thanks for the info!

Mike


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Data Protection Best Practice: AKA: Real Sheet Protection Mushman(Woof!)[_2_] Excel Discussion (Misc queries) 4 December 30th 09 01:20 AM
Excel Data Protection- AKA: Sheet/Macro Password Protection Mushman(Woof!) Setting up and Configuration of Excel 0 December 29th 09 06:50 AM
Sheet protection problem carl Excel Discussion (Misc queries) 1 March 18th 09 10:15 PM
VB Protection problem Rmagic Excel Worksheet Functions 1 November 22nd 05 10:27 PM
Protection Problem Dave123 Excel Discussion (Misc queries) 1 October 3rd 05 06:45 PM


All times are GMT +1. The time now is 02:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"