I have a userform that takes cell contents, allows editing in the userform and transfers contents back to the cell as you type. The font is preserved as well.
It works except for the instance described: If part of the string is selected/highlighted and the user types in character/s to overwrite the text, the fonts are lost.
I wanted to account for this by using the ".SelLength" property to back-calculate the fonts (.SelLength counts the number of characters highlighted).
The issue is that the information is lost on a "TextBox_Change" event (.SelLength goes to zero).
I have tried to resolve by using the "TextBox_BeforeUpdate" method but don't know how to do it.
Will it be possible?
FORM CODE
CLASS MODULE clsTextBox
Bookmarks