View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default free text box on a protected sheet

When you protect a sheet, you have 3 things you can protect: Contents,
Objects, Scenarios. If you don't protect contents, you should still be

able
to add comments.


Sorry, I meant if you don't protect **objects** rather than don't protect
comments.

If you need code that "holds your hand" to enter a comment, then I guess
Paul has given you that. I personnally wouldn't reinvent the wheel and just
use the comments capability provided with excel.

If you want to alter the appearance of a comment, turn on the macro
recorder, select a comment, right click on it and change the properties you
want. Then turn off the macro recorder. See Debra Dalgleish's site:

See the comment topics under the letter C:
http://www.contextures.com/tiptech.html

--
Regards,
Tom Ogilvy



"John Davies" wrote in message
...
Hi Tom

Sorry for the confusion. I do not want to save the sheet with the contents
unprotected in case somebody changes some formulas in the cells. What I
really need is a text box that will pop up by clicking a command button

even
though the sheet is protected so that I can enter miscellaneous

information
into the text box.

Also, would it be possible to run a macro to delete the popup box as it is
not always needed?

Thanks for your help.
John
"Tom Ogilvy" wrote:

Perhaps I misunderstood what you wanted.

When you protect a sheet, you have 3 things you can protect: Contents,
Objects, Scenarios. If you don't protect contents, you should still be

able
to add comments.

--
Regards,
Tom Ogilvy

"John Davies" wrote in message
...
Hi Tom

This does bring up a box but if I type anything in it and click the OK
button the text and box vanishes. Also is there a way to have more

than 1
line in the text box?

Thanks
John

"Tom Ogilvy" wrote:

Private Sub CommandButton1_Click()
Dim res as String
res = InputBox("Enter you text")
Activesheet.UnProtect Password:="ABCD"
' what you will do with the text
Activesheet.Protect Password:="ABCD"
End Sub

--
Regards,
Tom Ogilvy


"John Davies" wrote in

message
...
I have a protected spreadsheet that occasionaly I need to add

comments
or
notes to. However all cells on the sheet are in use. Is it

possible
to
have
a command button that if it is clicked will bring up a resizeable

box
that
text can be entered into? If so please advise on the code needed.

Thanks in advance for any help.

Regards
John