![]() |
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 |
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/ |
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/ |
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 |
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/ |
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 |
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/ |
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/ |
Cannot Lock Text Boxes-Excel 2002
A label works perfectly.
Thanks Tom and Doug! Celest -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 02:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com