Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21771

[RESOLVED] Only copy if textbox has been text inside of it

$
0
0
I need some help with how id code this, i've struggled for quite a while and just can't get it to work.

Basically say i've got three text boxes on a form - User Enters Information Against Each One

TextBox 1 = Name - Ian
TextBox 2 = Computer - Dell
TextBox 3 = System - Windows

If i was to setup a command button to copy that it would come out as
Ian
Dell
Windows

But what i want to happen is that say someone doesn't fill textbox 2 in. It would copy like this leaving a space

TextBox 1 = Name - Ian
TextBox 2 =
TextBox 3 = System - Windows

Eg:
Ian

Windows

Id prefer it to copy as
Ian
Windows

Any ideas? Tried If statements and everything (a lot more textboxes involved, hence why i want to try and get it working)

Currently just using
"Clipboard.SetText"

Viewing all articles
Browse latest Browse all 21771

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>