How to copy/cut the content of the text box to the clipboard
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 | 'Coding Basics - How to copy/cut the content of the text box to the clipboard Sub cmdCopy_Click() Clipboard.SetText Text1.SelText 'Copies only selected text 'Clipboard.SetText Text1.Text 'Copies whole TextBox content End Sub Private Sub cmdCut_Click() Clipboard.SetText Text1.SelText Text1.SelText = "" End Sub |
Related posts:
- This subroutine processes the cut, copy and paste commands.
- How to set text into Clipboard
- How to get text from Clipboard
- How to select the content of text box when entering into it.
- How to enable or disable the Cut, Copy and Paste menus in Edit menu if the text selected or not in a control.
- How to enable/disable submenus of Edit menu (Copy, Cut, Clear, Undo, and so on) based on text selection
- How to check whether the format of text in Clipboard is RTF format.
- How to Paste the Picture from PictureBox/Clipboard to Rich Text Box
- How to Copy List Box Content To Another List Box\Combo Box
- How to clear all text from Clipboard