Hi all, i am struggling with the RichTextBox control on my form, i can bold letters but canot unbold them here is my code :
VB Code:
Private Sub LabelBold_Cick() If RTBCode.SelBold = True then RTBCode.SelBold = Not True If RTBCode.SelBold = False then RTBCode.SelBold = True End Sub
Help please
EDIT: Nevermind, i know whats wring, even if the text gets set to unbold the next line sets it back to bold, wow, why didn't i notice that last night :S
I'm silly
The code should look like this :
VB Code:
Private Sub LabelBold_Click() If RTBCode.SelBold = True Then RTBCode.SelBold = Not True Else RTBCode.SelBold = True End Sub





Reply With Quote