Click to See Complete Forum and Search --> : How to copy code ?
Kars Lensen
Feb 1st, 2008, 01:28 PM
How to copy code ? In some threads there is code with numbers; I can't copy these code...
CVMichael
Feb 1st, 2008, 01:38 PM
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 (http://www.vbforums.com/forumdisplay.php?f=6)
Edgemeal
Feb 1st, 2008, 01:40 PM
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.
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.
Hack
Feb 2nd, 2008, 03:13 AM
Moved to Forum Feedback
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.