tip for locking a textbox in office apps
really didn't see a forum to put vba tips... moderator, move wherever you feel is appropriate..
the locked property of textboxes i never really like or the enabled = false.
what i've done is to drag a label and completely cover the textbox [label that is included with a textbox (ms-access), too] and for the text of the label i embed a char 255 - [sort of like a space, but not].
You can embed it by holding down the Alt key and on the number pad typing 255.
A user will not be able edit or type into the box and it looks completely normal.
Re: tip for locking a textbox in office apps
What is the purpose of chr 255? Wether I embedd it or not it still does the same.
Also, the cursor still responds to the keypresses, but no chars are displayed, so I guess thats ok.
The main issue with this is that it is only for appearance because if you place a command button on the form
and msgbox the textboxes contents it still contains the chars you typed. I tried this with both the textbox
having char 255 and the label too?
Am I missing something?
Btw, are you meaning the shapes textbox and label or the userforms?