Selected Text to Bold

  • Thread starter Thread starter JamesJ
  • Start date Start date
J

JamesJ

Hi. Without using the RichText control how can I
change selected text to bold? Every time I highlight
text and press ctrl+b I get an Object Required error.

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)

If KeyCode = vbKeyB And Shift = 2 Then
Me!MyTextBox.SelLength.FontWeight = 700
End If

End Sub

What I would like to accomplish is to use a text box for notes or
memos and want to toggle certain text to bold and be able to
change the font of selected text.
Can I do this with a standard text box??

James
 
Back
Top