• Welcome to Valhalla Legends Archive.
 

How to copy text?

Started by Forged, June 13, 2004, 02:02 AM

Previous topic - Next topic

Forged

How would I make a button copy text in a text box?  I tryed text1.seltext, but that didn't work.
QuoteI wish my grass was Goth so it would cut itself

UserLoser.

Copy text to clipboard?  Store the text in a variable?

Since you didn't be specific, I'll answer both...:


Private Sub SomeButton_Click()
   Dim TheMessage as String
   TheMessage = MyTextBox.Text
   MsgBox "The text in the text box is " & TheMessage & "!"
End Sub


Or to put it to the clipboard


Private Sub SomeButton_Click()
   Dim TheMessage as String
   TheMessage = MyTextBox.Text
   Clipboard.SetText TheMessage
End Sub

Forged

Private Sub SomeButton_Click()
   Dim TheMessage as String
   TheMessage = MyTextBox.Text
   Clipboard.SetText TheMessage
End Sub

Is what I was looking for.  Thanks alot.
QuoteI wish my grass was Goth so it would cut itself