vba - Excel: Object Text Box can't do Carriage Returns in Protected vs. Unprotected Sheet states (w/ Text Unlocked)...why? -
First and foremost, due to my hard work, I answered a ton about the Extix Text Box, but there is really nothing about the object text box. For my project, I can not use any ActiveX.
OK, so when a sheet is unsafe, one object text box (insert> images) is very much the way I want it works: most importantly, when it happens I can hit the Enter key and get a carriage return. Then, I go into the size properties, and uncheck the lock text, and I protect the sheet.
Once the sheet is safe, even then, the ability to return the car (type the type, and go down one line) goes away. Shift + Enter and also not Alt + Enter.
Is this functionality not available? Are there any solutions? Why does Excel hate me? Here are some of my thoughts:
- Unsecured sheets, when not clicked / activated (this did not understand the syntax in VBA for this.) "If there is a difference. .. "
- Insert Word Doc Object (do not like it because one-click formula bar enters editing, and I can not find the font to stay)
- Just use a merged cell and give the user a new line Double-click to enter Alt + Enter and use.
The winner is now using the merged cell for now, but I may be able to see if ActiveX will work on our network. I really want the kiss theory to be here if it is possible for the end user ... I do not have coding to do this work in backend, though.
Thank you for your thoughts!
Edit: Here are some images to help ...
Here's my functionality when my sheet is protected:
Next, this is an ActiveX text box with its property window displayed ( Developer> Design mode> Properties) Properties that make it somewhat usable when the Sheet is preserved, are considered in red and the key is Treatment record. But again, I do not want to use ActiveX ... In addition, the user can not change the font color from the line.
Finally, let me find this interesting Detected: There is another text box under the form control which is grayed out. From search, it seems that the drawing object of the text box was moved in favor of the version ... or maybe it's the same? One of the left paintings objects, gray in the middle is form control, and the right is Active X.
In the amount, I see I want the sheet box size of the unsafe sheet is a way to get the functionality of the box when the sheet is preserved. / P>
Assuming that you are working with a text box size , Inserted by ribbon, here:
safe
method in the optional parameters: sheet 1. Protected Drawing Object: = Incorrect
This will allow the user to edit the text boxes on the worksheet, but the sheet will remain safe for themselves.
If you are using form control (included with the developer / design ribbon) you can set the . Multiline
of the property's shape by OLEFormat.Object
:
sub-test () dim shape as a shape shaped as X Get a handle on the size set TB = ActiveSheet.Shapes (2) 'OLEFormat.Object: tb.OLEFormat.Object.Object.MultiLine = True End Sub
Use, even on a secure worksheet, allows the user to enter Shift + to insert the carriage return. :