|
-
Feb 1st, 2008, 02:28 PM
#1
Thread Starter
Addicted Member
How to copy code ?
How to copy code ? In some threads there is code with numbers; I can't copy these code...
-
Feb 1st, 2008, 02:38 PM
#2
Re: How to copy code ?
It was discussed about it here:
http://www.vbforums.com/showthread.php?t=484830
And questions like this, should be asked in the Forum Feedback
-
Feb 1st, 2008, 02:40 PM
#3
Re: How to copy code ?
If you mean there are numbers or "#" symbols between each line then here's what I do,
Copy the code as you normally would, then call this in one of your programs or make a program just for this pupose.
Code:
Private Sub mnuFixCode_Click()
Dim myarr() As String
Dim i As Integer
myarr = Split(Clipboard.GetText, vbNewLine)
For i = UBound(myarr) To 0 Step -1
If IsNumeric(myarr(i)) Then
myarr(i) = ""
ElseIf (myarr(i)) = "#" Then
myarr(i) = ""
End If
Next i
Clipboard.Clear
Clipboard.SetText Replace(Join(myarr, vbNewLine), vbLf & vbCr, "")
End Sub
Now paste to VB as you normally would.
-
Feb 2nd, 2008, 04:13 AM
#4
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
|