|
-
Jul 6th, 2008, 10:02 AM
#1
Thread Starter
Member
Strip Numbers from VBForum Code
Howdy all;
I found a link a while ago that strips the line numbering from the Code samples on this site, but have not been able to find it again. Does anyone still have the link?
-
Jul 6th, 2008, 10:35 AM
#2
Re: Strip Numbers from VBForum Code
A link that strips the line numbers from the code? That's a very powerful link. Are you sure it's a link that strips line numbers or a link to a post that tells you how to do it?
You can always Quote the post with the VBCode and that will remove the line numbers and then you will need to copy out the code you want from the quoted post.
-
Jul 6th, 2008, 11:39 AM
#3
Thread Starter
Member
Re: Strip Numbers from VBForum Code
jmsrickland, never thought of that. Thanks.
Yep, there is a link for an html page that, I believe funnels vbforum pages through it, so when you see the page, you get all the code without the numbers.
I m still searching cd's ( I reimaged my pc about 3 months ago), so if no one else has it, and I find it I'll post here.
-
Jul 6th, 2008, 11:43 AM
#4
Lively Member
Re: Strip Numbers from VBForum Code
I don't know who posted this code, but it works for me.
Copy the code you want from this forum into the clipboard,run the following code, and then paste it to notepad or directly in you app.
Code:
Private Sub Form_Load()
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, "")
Unload Me
End Sub
I modified the original code to fit my purposes so I don't know how much of it is mine...
Last edited by TheOldNewbie; Jul 6th, 2008 at 12:13 PM.
-
Jul 6th, 2008, 12:20 PM
#5
Thread Starter
Member
Re: Strip Numbers from VBForum Code
TheOldNewbie - brilliant. Shows you where my mind is. I am such a lazy putz...
AAAANNNDDD ROLF. So now NO posts have line numbers in it. Ok what happened. I am trying to set The OldNewbie's code and I can't find any post with the numbers.. so.. the great vbGod flipped the swtich?
-
Jul 6th, 2008, 12:25 PM
#6
Lively Member
Re: Strip Numbers from VBForum Code
 Originally Posted by peteleeb
AAAANNNDDD ROLF. So now NO posts have line numbers in it. Ok what happened. I am trying to set The OldNewbie's code and I can't find any post with the numbers.. so.. the great vbGod flipped the swtich?
Hint....Put line numbers in your code and try it...hehe.
-
Jul 6th, 2008, 01:20 PM
#7
Re: Strip Numbers from VBForum Code
MartinLiss wrote a utility in Utility Bank forum that does just that. The line number have been a known issue for about a year now.
http://www.vbforums.com/showthread.php?t=484830
Utility:
http://www.vbforums.com/showthread.php?t=458328
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 6th, 2008, 02:00 PM
#8
Re: Strip Numbers from VBForum Code
Well, one way to solve this problem is that no one uses VBCode. I don't use it, never liked it in the first place, and never could understand why other people use it. It's a pain in the $%^@ to extact out the code you want. Why doesn't everyone just use the [CODE] tags instead? It would sure make things alot simplier. That's my opinion.
-
Jul 6th, 2008, 02:12 PM
#9
Re: Strip Numbers from VBForum Code
Its not the vbcode tags as those have been replaced with highlight tags "[highlight=vb.net]" is the actual tag.
The new code parser perform much more colouring not just for VB but all of .NET languages as well as many other non-.net languages
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 6th, 2008, 02:17 PM
#10
Re: Strip Numbers from VBForum Code
 Originally Posted by jmsrickland
Why doesn't everyone just use the [CODE] tags instead? It would sure make things alot simplier. That's my opinion.
I use both. For pseudocode and descriptive code snippets, I use highlight tags. For code I intend somebody to actually use, I use normal code tags for ease of copying.
The exception is in the CodeBank. I always use highlight tags there, though I'm not sure why.
-
Jul 6th, 2008, 02:21 PM
#11
Re: Strip Numbers from VBForum Code
I rarely use highlight tags as I really dont care about the colouring (besides there are some keywords still missing and C# code has a bug in it). I tried using them but its just longer text to type and I'd rather use something that is more user friendly for a better user experience.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 6th, 2008, 02:52 PM
#12
Re: Strip Numbers from VBForum Code
I think I got to dislike the "[highlight=vb.net]" (thought it was VBCode tags) before I knew about just quoting the post and then do a copy paste of the code I wanted. Even then, when I see VB code within those tags I still don't like it because the cloring is very distracting and sometimes I can't even see the colored text it is so faint (a very very light green) it hardly shows up on my PC monitor. Maybe it's my color settings but I am not going to mess with those settings since I spent too much time getting them just right and everything else in color appears to be very good with the exception of some of the colors in the VB code.
-
Jul 6th, 2008, 02:58 PM
#13
Re: Strip Numbers from VBForum Code
Also check the most simplest way to do it....
in my signature...
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Jul 6th, 2008, 03:07 PM
#14
Re: Strip Numbers from VBForum Code
Thats a good trick ks but if you use Martins utility its much less steps and easier
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 7th, 2008, 12:11 AM
#15
Re: Strip Numbers from VBForum Code
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Jul 7th, 2008, 12:37 AM
#16
Re: Strip Numbers from VBForum Code
I'll take your word for it that the one made by MartinLiss is as good as you say it but I see one problem. Not everyone has Word. I don't, so I can't use it. I'm not trying to be disrespectful but I think it should have been written with out any secondary application needed.
-
Jul 7th, 2008, 01:34 AM
#17
Re: Strip Numbers from VBForum Code
You guys can read the posts in the feedback forum thread I linked to in my post for feedback on it and also other workarounds.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 7th, 2008, 11:56 AM
#18
Addicted Member
Re: Strip Numbers from VBForum Code
This is actually a problem? I can copy the code people have used the highlight tags on directly from here to vb.
Simple little bugs 13 : Me 1
Law of Bugs - That one bug you missed will be found almost immediately, by your customer.
I wonder if anyone has ever asked for a User Surly interface?
-
Jul 7th, 2008, 11:59 AM
#19
Re: Strip Numbers from VBForum Code
Yes you can copy them but the line numbers come along with it and an extra line inbetween.
Thread Moved
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 7th, 2008, 12:07 PM
#20
Re: Strip Numbers from VBForum Code
I think the simplest way is to simply hit the "Quote" button on the post with the code.
Then, from the Quoted section, just copy the code, and cancel out of the Quote.
-
Jul 7th, 2008, 12:31 PM
#21
Lively Member
Re: Strip Numbers from VBForum Code
To each his own, but I liked mine best.I compiled mine to an EXE and put a shortcut in the taskbar.
When I wanted to copy some code with numbers, I would copy the code,hit the shortcut, and then paste it to my code window.Only 3 steps.1 more than a simple copy/paste.
But that's just me.
-
Jul 7th, 2008, 12:34 PM
#22
Re: Strip Numbers from VBForum Code
 Originally Posted by Hack
I think the simplest way is to simply hit the "Quote" button on the post with the code.
Then, from the Quoted section, just copy the code, and cancel out of the Quote.
How can that be eaiser then the standard Copy/Paste operation? The utility intercepts the action and fixes it on the fly. No quoting or other workarounds. If you havent tried it you really should.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 7th, 2008, 01:54 PM
#23
Lively Member
Re: Strip Numbers from VBForum Code
 Originally Posted by RobDog888
How can that be eaiser then the standard Copy/Paste operation? The utility intercepts the action and fixes it on the fly. No quoting or other workarounds. If you havent tried it you really should.
Originally Posted by Hack
I think the simplest way is to simply hit the "Quote" button on the post with the code.
Then, from the Quoted section, just copy the code, and cancel out of the Quote.
1.Hit the "Quote"
2.Copy the code
3.Paste the code
4.Cancel out "Quote"
I may be looking at it incorrectly but I count 4 steps to my 3.
But like I said , that's only me...
-
Jul 7th, 2008, 01:58 PM
#24
Re: Strip Numbers from VBForum Code
The utility...
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Jul 7th, 2008, 07:03 PM
#25
Lively Member
Re: Strip Numbers from VBForum Code
 Originally Posted by RobDog888
The utility...

Touche'.....
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
|