Im trying to copy items from listbox into my clipboard. The first word always works, but the rest just left blank. I am using this code
And both msgboxes I put in shows what the clipboard should contain and both works correctly, but when I try to paste my clipboard, it wont show anything. I have tried different methods but never got this error, anyone knows a way to work around this?
Dim ordning As Integer = 0 Dim clip As String = "" If ordning < allanamn.Items.Count Then clip = allanamn.Items.Add(ordning) MsgBox(clip) My.Computer.Clipboard.SetText(clip) MsgBox(My.Computer.Clipboard.GetText) ordning += 1 End If