Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cannot Lock Text Boxes-Excel 2002

I have a spreadsheet with several text boxes that I do not want users t
edit. The text boxes are locked and the worksheet is protected.
However, users can still enter data into the locked text boxes. Th
only remedy that I have found is to disable the text boxes, but I d
not like the grayed font that is displayed when a box is disabled.

Any help is appreciated,
Celest

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Cannot Lock Text Boxes-Excel 2002

have you protected the objects on the worksheet? sheet protection has three
areas that can be protected.

--
Regards,
Tom Ogilvy

"celeste " wrote in message
...
I have a spreadsheet with several text boxes that I do not want users to
edit. The text boxes are locked and the worksheet is protected.
However, users can still enter data into the locked text boxes. The
only remedy that I have found is to disable the text boxes, but I do
not like the grayed font that is displayed when a box is disabled.

Any help is appreciated,
Celeste


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Cannot Lock Text Boxes-Excel 2002

Celeste,

Did you set the LockedText property along with the locked? For example:

Sub test()

With ActiveSheet.TextBoxes("Text Box 1")
.Locked = True
.LockedText = True
End With

End Sub

Note that the LockedText property is not available if you are referring to
the textbox as a member of Shapes, only when you access it through the
TextBoxes collection, as above.

hth,

Doug

"celeste " wrote in message
...
I have a spreadsheet with several text boxes that I do not want users to
edit. The text boxes are locked and the worksheet is protected.
However, users can still enter data into the locked text boxes. The
only remedy that I have found is to disable the text boxes, but I do
not like the grayed font that is displayed when a box is disabled.

Any help is appreciated,
Celeste


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cannot Lock Text Boxes-Excel 2002

Doug,
I tried your code and got "Object does not support this property o
method"

Celest

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Cannot Lock Text Boxes-Excel 2002

Celeste,

I only get that message if I'm referring to it as a Shape. When I change it
to TextBoxes, it works.

With ActiveSheet.TextBoxes("Text Box 1")

If you're still getting the message, I don't know what to do, as I can't
duplicate, and I am using XP 2002.

hth,

Doug

"celeste " wrote in message
...
Doug,
I tried your code and got "Object does not support this property or
method"

Celeste


---
Message posted from http://www.ExcelForum.com/





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cannot Lock Text Boxes-Excel 2002

The text boxes that I am using are not drawing objects. They are activ
X objects. I think that's why that code that Doug suggested does no
work.

Celest

--
Message posted from http://www.ExcelForum.com

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Cannot Lock Text Boxes-Excel 2002

Celeste,

Ah ha. Yes, it looks to me like locking a textbox from the Controls Toolbox
means you can't manipulate it even in design mode. I don't see any way of
locking the actual text in it.

If you want to use something from the Controls Toolbox and not have it
changed by a user, would a label work?

Doug

"celeste " wrote in message
...
The text boxes that I am using are not drawing objects. They are active
X objects. I think that's why that code that Doug suggested does not
work.

Celeste


---
Message posted from http://www.ExcelForum.com/



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Cannot Lock Text Boxes-Excel 2002

Sounds like you are using a textbox from the control toolbox toolbar.
Recommend you use a label and change the SpecialEffect property to
fmSpecialEffectSunken (2). This makes the label look just like a textbox,
the text will be bright and it can't be edited.

--
Regards,
Tom Ogilvy


"celeste " wrote in message
...
Doug,
I tried your code and got "Object does not support this property or
method"

Celeste


---
Message posted from http://www.ExcelForum.com/



  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cannot Lock Text Boxes-Excel 2002

A label works perfectly.

Thanks Tom and Doug!

Celest

--
Message posted from http://www.ExcelForum.com

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
Tabbing through Text Boxes in Excel 2002 LSilver Excel Discussion (Misc queries) 1 May 30th 09 05:12 AM
migrating check boxes in Excel 2002? OutofmyLeague Excel Discussion (Misc queries) 1 May 5th 06 01:36 PM
Excel 2002 Will Not Print Text Boxes Mark Excel Discussion (Misc queries) 3 April 16th 05 12:03 AM
Protection of check boxes in excel 2002 Newbeetle Excel Discussion (Misc queries) 2 March 14th 05 12:59 PM
Check mark boxes in Excel 2002 Dan E[_2_] Excel Programming 0 July 8th 03 03:41 PM


All times are GMT +1. The time now is 08:37 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"