Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
On my userform I multi line textbox that only allows 250 characters. Instead of the user typing in text the normal way, like the following:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
They are copying and pasted the text into the textbox so it looks like the following:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
In order to see the entire entry in the cell, the user would have to expand the cell height. I have included the section of code that would be handling this task and I have already tried the following way, but this did not work. From what I can see, the sheet/cells are not protected. Any advice would be greatly appreciated. Thank you.
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
They are copying and pasted the text into the textbox so it looks like the following:
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
In order to see the entire entry in the cell, the user would have to expand the cell height. I have included the section of code that would be handling this task and I have already tried the following way, but this did not work. From what I can see, the sheet/cells are not protected. Any advice would be greatly appreciated. Thank you.
VBA Code:
If rngItem.Offset(, 3).Value = "" Then
rngItem.Offset(, 3).Select
rngItem.Offset(, 3).Value = Me.txtbxDescription.Value
With Selection
.Rows.AutoFit
End With
End If