|
-
Oct 1st, 2000, 07:04 PM
#1
Thread Starter
The picture isn't missing
how do you make items from a listbox and change them so they go into notepad? i can open, notepad, and can send the keys, but i dont know how to make the items in the listbox go in. please help me
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Oct 1st, 2000, 07:18 PM
#2
Use SendKeys.
Code:
Private Sub Command1_Click()
For i = 0 To List1.ListCount - 1
DoEvents
AppActivate "Untitled - Notepad"
SendKeys List1.List(i)
SendKeys "{ENTER}"
Next i
End Sub
-
Oct 1st, 2000, 07:22 PM
#3
Add a MultiSelect Listbox to a Form:
Code:
Option Explicit
Private Sub Form_Load()
Dim lCount As Long
For lCount = 1 To 10
List1.AddItem "Item " & lCount
Next
End Sub
Private Sub Command1_Click()
Dim lCount As Long
Dim sClip As String
For lCount = 0 To List1.ListCount - 1
If List1.Selected(lCount) Then sClip = sClip & vbCrLf & List1.List(lCount)
Next
Clipboard.Clear
Clipboard.SetText Mid(sClip, 3)
End Sub
Select the items, press the button then do a CTRL + V or select Paste in Notepad.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|