Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
When protecting the textboxes in my worksheet, I cannot write text to the box in VBA. How can I unprotect it in my VBA-code, write text in it and then protect it again ? I want to prevent that the application user moves the textbox or alters the content: how to do this ? Greets, Tom |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Set lock =false before you write to it and then to locked =true when you are
done writting to it like so: ActiveSheet.Shapes("TextBox1").Locked = True Code that writes to the text box goes here ActiveSheet.Shapes("TextBox1").Locked = False -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Tom Emmery" wrote: Hi, When protecting the textboxes in my worksheet, I cannot write text to the box in VBA. How can I unprotect it in my VBA-code, write text in it and then protect it again ? I want to prevent that the application user moves the textbox or alters the content: how to do this ? Greets, Tom |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Michael,
This gives a runtime error 1004 Application-defined or object-defined error. What's wrong ? Greets, Tom "Michael" wrote: Set lock =false before you write to it and then to locked =true when you are done writting to it like so: ActiveSheet.Shapes("TextBox1").Locked = True Code that writes to the text box goes here ActiveSheet.Shapes("TextBox1").Locked = False -- If this posting was helpful, please click on the Yes button. Regards, Michael Arch. "Tom Emmery" wrote: Hi, When protecting the textboxes in my worksheet, I cannot write text to the box in VBA. How can I unprotect it in my VBA-code, write text in it and then protect it again ? I want to prevent that the application user moves the textbox or alters the content: how to do this ? Greets, Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 Protect file from being deleted | Excel Discussion (Misc queries) | |||
textbox in excel 2003 | Excel Worksheet Functions | |||
how to totally protect data excel 2003 | Excel Discussion (Misc queries) | |||
Can't protect some cells in Excel 2003 | Excel Discussion (Misc queries) | |||
Removing textbox padding, how to please, Excel 2000/2003 | Excel Programming |