Use If / Then statements to build your string:
etc...Code:If TextBox1.Text.Trim.Length > 0 Then strOutput = "Who:" & vbTab & TextBox1.Text & vbCrLf End if If TextBox2.Text.Trim.Length > 0 Then strOutput = strOutput & "When:" & vbTab & TextBox2.Text & vbCrLf End if
Write to the clipboard using:
Code:Clipboard.SetDataObject(strOutput)




Reply With Quote