Abundant Technologies - IT Consulting Experts

 Source Code Library

 Code Details

 
Copying a part of text

Copying a part of text

Sub Command1_Click()
Clipboard.Clear
If TypeOf Screen.ActiveControl Is TextBox Then
Clipboard.SetText Screen.ActiveControl.SelText
ElseIf TypeOf Screen.ActiveControl Is ComboBox Then
Clipboard.SetText Screen.ActiveControl.Text
ElseIf TypeOf Screen ActiveControl Is PictureBox Then
Clipboard.SetData Screen.ActiveControl.Picture
ElseIf TypeOf Screen.ActiveControl Is ListBox Then
Clipboard.SetText Screen.ActiveControl.Text
Else
End If
End Sub


Mail To: info@3pc.com