I believe the problem for VB'ers is that the RichText control is from richtx32.ocx, which is based on riched32.dll. As per Microsoft (
http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/richedit/richeditcontrols/aboutricheditcontrols.asp ) this library only supports one level of undo. Later versions of riched (riched20.dll, etc.) allow for multiple levels, but I have found no Microsoft ocx that uses this library.
Bottom line, not going to happen using ONLY Richtext control, even with the correct messages sent to it.
As a side note, I found a few logic errors in above code...
1)
Public Property Get CanCopy() As Boolean
If rtb1.SelLength < 0 Then
CanCopy = True
End If
End Property
Should read as
Public Property Get CanCopy() As Boolean
If rtb1.SelLength > 0 Then
CanCopy = True
End If
End Property
2)
With richtx32.ocx, the above code will display the undo all the time. This is confusing during runtime. Really we only want it to show if there is no redo. This requires one of any number of possible revisions. Generate your favorite.