I’m getting an error which i can’t solve, even after about an hour of research.
Conversion from String “Waseem-PC\Waseem” to long is not valid
This error really gets annoying, I tried everything!
I would really appreciate help from you. I would love to give your answers a thumbs up but i have to have a bigger rep.
Here is my code
Private Sub RichTextBox2_KeyPress(sender As Object, e As KeyPressEventArgs) Handles RichTextBox2.KeyPress
If Asc(e.KeyChar) = Keys.Enter Then
RichTextBox1.Text = RichTextBox1.Text And vbNewLine And RichTextBox2.Text
End If
End Sub
You’re incorrectly using the And keyword which is used for (from MSDN):
Instead you want to use
&to concatenate the strings…This will work: