Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have several textboxes on a worksheet.
I will have to protect the text in these boxes with help of vba code. When protecting text in one specific textbox I use: Worksheets(1).Shapes("txtbox1").LockedText = True I want to protect all boxes with one command. I am thinking about something like For each Textbox in Worksheets(1) LockedText = True I am struggling with the syntax to make this work. Can anybody help me out? rgds Jarle .. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim TBox As TextBox
For Each TBox In Worksheets("Sheet1").TextBoxes TBox.LockedText = True Next TBox Jarle wrote: I have several textboxes on a worksheet. I will have to protect the text in these boxes with help of vba code. When protecting text in one specific textbox I use: Worksheets(1).Shapes("txtbox1").LockedText = True I want to protect all boxes with one command. I am thinking about something like For each Textbox in Worksheets(1) LockedText = True I am struggling with the syntax to make this work. Can anybody help me out? rgds Jarle . -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks again, Dave!
Dave Peterson skrev: Dim TBox As TextBox For Each TBox In Worksheets("Sheet1").TextBoxes TBox.LockedText = True Next TBox Jarle wrote: I have several textboxes on a worksheet. I will have to protect the text in these boxes with help of vba code. When protecting text in one specific textbox I use: Worksheets(1).Shapes("txtbox1").LockedText = True I want to protect all boxes with one command. I am thinking about something like For each Textbox in Worksheets(1) LockedText = True I am struggling with the syntax to make this work. Can anybody help me out? rgds Jarle . -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Protect Drawing Objects bug in 2003? | Excel Programming | |||
Protect Excel 2000 Objects | Excel Programming | |||
Protect Objects so they cannot be resized | Charts and Charting in Excel | |||
How can I protect objects differently? | Excel Programming | |||
Unable to remove Sheet objects in the Microsoft Excel Objects | Excel Programming |