Important alert: (current site time 11/23/2014 12:17:01 AM EDT)
 

winzip icon

Code Fixer 3.0.9

Email
Submitted on: 3/2/2005 7:56:18 AM
By: Roger Gilchrist 
Level: Advanced
User Rating: By 60 Users
Compatibility: VB 6.0
Views: 38586
author picture
(About the author)
 
     This is a VB6 Add-in. It's purpose is to format, optimize and improve VB code. Many fixes are performed automatically and there are also many additional suggestions to improve your code. ---------------------------------------------------------------------- It also contains a user-friend replacement for VB's find and replace tool. ---------------------------------------------------------------------- This is a very powerful tool so please download the separate help file upload and read it for installation and operating instructions. ---------------------------------------------------------------------- If you have tried it before then it's time to up-date (or give it another go, there may have been a lot of bug fixes and improvements since then). ---------------------------------------------------------------------- Comments/bug reports welcome. Please contact me if you have any questions. Re-issued because the version number has rolled over and to gather some new end-user input so suggest away. --------------------------------------- Updates 3.0.9 FIXED debug Stop left in code, NEW fix Fonts properties in USerControls fix, Release folder has better naming see history.txt for details and thanks

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 95 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

3/2/2005 10:29:37 AMRoger Gilchrist

hi Oop! if you see this please send me the code at the address in the help file, for some reason gmail rejects the address i got when your message was delivered. CF contains functions with optional parameters and has been run on its own source code without probelms so I'm assuming that the problem may be something else or a combination of 2 fixes hitting the same piece of code. LEt me know soonest.
(If this comment was disrespectful, please report it.)

 
3/2/2005 11:39:45 AMRaziel

Well , no need to check the code , just compile and use xD .. 5 from me :) Keep up the good work.
(If this comment was disrespectful, please report it.)

 
3/2/2005 4:46:26 PMRoger Gilchrist

Hi all, I have deleted a negative comment as the sender doesn't appear to have a valid address nor give details of what went wrong. My best guess they had multiple fixes all hitting the same problem (a function parameter, probably untyped and poorly named and probably the function itself was untyped too) and the fixes may have messed with each other. Oop! if your'e out there try using the emailer you can get by clicking on my name at top of this message, much more space but you'll have to use cut'n'paste becuase it times out fairly quickly
(If this comment was disrespectful, please report it.)

 
3/2/2005 11:41:51 PMDean Camera

This software is ALWAYS pure brilliance. If only my DeepLook was half as good...

5 shiny balls.
- Dean
(If this comment was disrespectful, please report it.)

 
3/3/2005 7:48:48 AMHerbert N Swearengen III

Fantastic and VERY useful application!
(If this comment was disrespectful, please report it.)

 
3/3/2005 9:11:52 AMThorben Linneweber

nice code and well formated ;)
(If this comment was disrespectful, please report it.)

 
3/3/2005 1:14:51 PMjames kahl

Roger, great work as always, even better than previous versions. Some pretty intensive code. Can take quite awhile to complete larger projects, but it's certainly better than the alternative. Maybe I missed it, but is there a way to customize the declarations without altering code, ie. in declarations section I prefer not to have all the As Long, As String, etc. aligned to a specific column, and in a procedure, I prefer to indent my delcares. As always, excellent submission, 5 from me.
(If this comment was disrespectful, please report it.)

 
3/3/2005 8:40:46 PMRandy Giese

Mr Gilchrist;
I have been using your wonderful product for so many iterations that I can't even guess. I'm sure I've used CF at least a 1000 times by now.
I use it on my code as well as code I download. I am amazed at how much stuff CF can fix.

But, I think the biggest asset I have received is in learning to write better code. I've learned to use better names for Controls and Variables.... and many other things, too numerous to list here.

Thank you for a wonderful program and for being so willing to help others!!!!! Excellent job!
(If this comment was disrespectful, please report it.)

 
3/4/2005 3:53:21 AMDean Camera

Yes, this is quite a bit better than the now infamous "MonkeyMoose"... ;)

Takes a while to scan on my old laptop but always worth the effort.

- Dean
(If this comment was disrespectful, please report it.)

 
3/5/2005 6:55:01 AMPaul Caton

Excellent, Roger, had to laugh a little when I saw 'subclass code detected' - but whatever, it survived CodeFixin' -- I presume you're specifically looking for 'Caton Code (tm)' rather than something generic, right?? Now I know I've made my mark on the community :)
(If this comment was disrespectful, please report it.)

 
3/7/2005 1:48:02 AMPaul Turcksin

Thanks Roger.
(If this comment was disrespectful, please report it.)

 
3/9/2005 7:37:13 AMRoger Gilchrist

hi all
apologies to oop for deleting his comment earlier we have emailed and fixed the bug he found. Unused parameters in very large (48-49) parameter procedure headers caused the code to be damaged when the comment was inserted in wrong place.
Also just deleted an irrelevant tamogachi comment, don't think there'll be any apologies for that one.... ;)

(If this comment was disrespectful, please report it.)

 
3/10/2005 5:00:46 PMAnthony Martin

Brillant. My 1st coding effort & this prog show me where I needed to improve the quality. Outstanding work.
5 Globes from me.
(If this comment was disrespectful, please report it.)

 
3/14/2005 10:40:04 AMUlli

Very good, Roger!! One tiny omission: it ReDims explictly with the original type when it knows the type from the var declaration but not when the array is passed in as a parameter like:

Private Sub Blabla (Arr() As Byte)
:
:
Redim Arr(1 To 100) 'no type added here
:
:

Maybe you want to fix that. Another thing is the replacing of global variables by properties: You replace them both as Let and Get, so effectively there is the same encapsulation as before (namely none - the variable can be read and written to from outside without any restriction).

(If this comment was disrespectful, please report it.)

 
3/14/2005 11:25:32 PMRoger Gilchrist

Ulli's right. The Redim fix is patchy I added them as I can find a safe way to code them (It fails at present if you redim a type member because it gets the Type's Type not the members, I have left this in till i fix it becasue it is very rare).
The Properties are of course just as poor as the variable but at least you now have the framework to insert your error checking, It is also better than the Tools menu property builder because the Properties get the right Type. NOTE the fix also does Set/Get Properties and they really are useful.
(If this comment was disrespectful, please report it.)

 
3/17/2005 7:42:16 PMLaVolpe

Impressive. Need to play more & learn from it.
(If this comment was disrespectful, please report it.)

 
4/2/2005 3:46:10 PMPower Of Anubis

COngratulations Roger !
You are a contest winner
(If this comment was disrespectful, please report it.)

 
4/4/2005 1:06:09 PM

What a Code !!! ,, What a coder !!!

Great Tool ,,, Big Thanks ,, x05h * Stars
(If this comment was disrespectful, please report it.)

 
4/7/2005 5:31:41 AMPhishbowla

This is excellent work. Worthy of 5 stars easy. I couldn't seem to find the .chm help file though. Must have missed it somehow. In any case, once I look over it again and tweak the settings I can see myself using this a whole lot. Keep up the guru work!
(If this comment was disrespectful, please report it.)

 
4/8/2005 1:45:58 AMRoger Gilchrist

just a reminder to all help file is at a separate PSC page
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=59248&lngWId =1

YOu
wouldn't want that every time i do a bug fix. I'll add a comment to the update comment when the help has also been updated. Taking advantage of a broken ankle to really get into major rewrite, with the long promised Variables tool and a revamped Controls tool both as UserDocuments (dockable windows lik ethe find tool)
(If this comment was disrespectful, please report it.)

 
4/8/2005 11:01:34 PM

sorry i cant seem to find the seperate help file. when i put that link in the browser it says
(If this comment was disrespectful, please report it.)

 
4/8/2005 11:11:54 PM

sorry that previous post was me but there seems to have bin an error. it should have read: when i put that link in the browser it(psc) says .you have bookmarked an old page. thanks for helping me ^^
(If this comment was disrespectful, please report it.)

 
4/13/2005 12:05:51 AMPhishbowla

It's amazing, you've essentially embedded a programming teacher with in an application. I'm so impressed that I just had to post again :)
btw.. above link to help page worked for me.
(If this comment was disrespectful, please report it.)

 
5/6/2005 10:09:46 AMMatthew R. Usner

Thanks Roger!

(If this comment was disrespectful, please report it.)

 
6/20/2005 8:25:48 PMACY

Hi again Rodger. Always a pleasure finding you've been improving the "Code Fixer". 5g's and thank you for sharing such a valuable tool.
(If this comment was disrespectful, please report it.)

 
6/20/2005 10:29:04 PMRoger Gilchrist

hi everybody, just to let you know v4 is coming along, just(!) rewriting the help file and getting some beta bugs fixed.
(If this comment was disrespectful, please report it.)

 
6/23/2005 9:04:26 AM

Hi
first i love this tool it works fine all the time, up to now.


Code Fixer 3.0.9

Dazzle Project explorer V1.1 (from PSC)
http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=40252&lngWId =1
->

Progress
View->
Restructure
mdlDazzProjExplorer.bas
Integer to Long
at the absolte beginning ...

fatal error
VB6.exe -> 0x0fbb8241 Memory 0x0000000 read ...

debugger:
unhandled exception VB6.exe (VBA6.dll) in 0x0000005 Access Violation
0FBB8232 push ebp
0FBB8233 mov ebp,esp
0FBB8235 sub esp,0Ch
0FBB8238 mov eax,dword ptr [ebp+8]
0FBB823B push ebx
0FBB823C xor ebx,ebx
0FBB823E mov dword ptr [ebp-0Ch],ebx
0FBB8241 cmp byte ptr [eax],bl <- Points here


thanks
(If this comment was disrespectful, please report it.)

 
8/10/2005 7:11:36 PMRoger Gilchrist

hi all,
just to let you know still working on v4 (but not going to promise a date again ;))
(If this comment was disrespectful, please report it.)

 
8/11/2005 12:43:00 AMMichael Ingall

Looks great, but where is the help/install file, please?
(If this comment was disrespectful, please report it.)

 
8/11/2005 2:38:43 AMtibisan

can you email me please when you post version 4? i don't wanna miss it. 5G for current one.
(If this comment was disrespectful, please report it.)

 
8/14/2005 12:25:43 AMal boz

Wow, wowow
(If this comment was disrespectful, please report it.)

 
9/16/2005 4:41:01 AMleo

your program is really a great help - thank you

I'm looking forward to v4 - some news of a possible date


(If this comment was disrespectful, please report it.)

 
9/16/2005 8:45:40 PMRoger Gilchrist

hi all,
just got a hopefully candidate ready when i found some problems with big number math for some of the fixes, so another short delay. Help file still needs a bit of editing too. hopefully soon. I am offering BETA versions for pre-testing just drop me a line if you want one (NO help file at all)
(If this comment was disrespectful, please report it.)

 
9/16/2005 8:51:53 PMRoger Gilchrist

PS Don't post it here,
click my name above and use PSC's anonymous emailer (don't forget to include your address in the text!) or get the address from the help file in version 3. Note if you use gmail(yeah) you'll need another address as the gmail filters(boo) block cls files.
(If this comment was disrespectful, please report it.)

 
10/20/2005 11:54:45 AMDave

I've noticed the fixer tool has problems handling code with SQL statements in it with line continuation and line continuation in general causes it problems. It also has problems dealing with code that is commented out. A few other problems I ran into with it also but not worth mentioning. But other than that very nice program. I pretty much just use it as a better search tool, but some of the other features are nice.
(If this comment was disrespectful, please report it.)

 
10/20/2005 12:01:35 PMDave

Noticed problem where code fixer comments out a const that is set equal to another const. The DBID const is being used in the module.
'Private Const DbID = dbCfgQA
'<:-) :WARNING: Unused & Untyped Variable is not used in code
(If this comment was disrespectful, please report it.)

 
2/8/2007 10:55:54 AMMr. Underhill

This bloody code ROCKS... WOW!!! It cleared in five or ten minutes stuff that I had been pulling my hair out from for what seems like eons... You know clutter, and my program still works I must've done something right... Roger definately deserves the five golden globes...
(If this comment was disrespectful, please report it.)

 
3/27/2007 6:32:04 PMrick

I note that most comments above come from 2005. Well its now 2007 and I've just come across this excellent article. Don't know if voting now will make any difference but here my five anyway. Brillant
(If this comment was disrespectful, please report it.)

 
8/28/2007 3:28:09 PMLorin

The legal (but possibly unwise) use of reserved words such as 'NEXT' within a Type declaration stops code fixer dead in its tracks indicating an error in the code. Running additional scenarios and will provide more. Excellent code!
(If this comment was disrespectful, please report it.)

 
7/7/2010 1:32:34 AMSh�ftY

This sir is amazing. :) Thanks for this great great code. I can see myself using this alot. I know now it's 2010 but still worthy of my 5 Globes.

Thanks again!
(If this comment was disrespectful, please report it.)

 
11/8/2013 11:09:08 PMWhite Ginger

:) super
(If this comment was disrespectful, please report it.)

 
1/5/2014 5:52:35 PMLorinM

In addition to my post of 8/28/2007 regarding reserved words, beware of the scrambled code you will get if you use multiple
#If X
#Else
#End If
Possible turning off module sort will help this. Click on the Properties icon (to the left of the Hammer icon) and go to the Code Fixer Tools / Format Sort Module and select Off.

If ever Roger come back, please also allow:
1) indent of component level
Dim, Const and Static ...
2) placement of On Error ...
At the top of the component (Sub or Function).
Some of us like that formatting since it is easier to find the initial error handling and easier on the eye since then only labels are leftmost.
TIA

(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.