Hi,
I want to be able to copy text from a textbox to my windows clipboard.
I have the code for that already
"Clipboard.SetText(txtAccountNumber.Text & vbCrLf & lblCustomerName.Text & txtCustomerName.Text)"
but I want it only to copy if the text box has writing in it, otherwise when you paste it there's lots of empty gaps because the text box hasn't had text hadn't anything written inside of it.
I was thinking of an If statement like this, but this doesn't work:
If txtAccountNumber.Text = True Then
Clipboard.SetText(txtAccountNumber.Text)
Else
txtAccountNumber.Text = False
End If
Any ideas?
I want to be able to copy text from a textbox to my windows clipboard.
I have the code for that already
"Clipboard.SetText(txtAccountNumber.Text & vbCrLf & lblCustomerName.Text & txtCustomerName.Text)"
but I want it only to copy if the text box has writing in it, otherwise when you paste it there's lots of empty gaps because the text box hasn't had text hadn't anything written inside of it.
I was thinking of an If statement like this, but this doesn't work:
If txtAccountNumber.Text = True Then
Clipboard.SetText(txtAccountNumber.Text)
Else
txtAccountNumber.Text = False
End If
Any ideas?