Solved

tool request: VBA source code formatter/beautifier

Posted on 2002-05-03
4
1,771 Views
Last Modified: 2008-01-09
Hi experts,

I am looking for a source formatter which helps me to format my VBA macros.

This tool should meet the following requirements

* no more expensive than 25 USD/EUR

* it should support both Excel and Winword and Access

* it should be a stand-alone executable, not an Add-In.

I would like to add a menu-item to MS Office and start the formatter by a keyboard hotkey.

Do you know such a tool?
0
Comment
Question by:mathes
  • 2
  • 2
4 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 6989591
Hi Mathes,

personally i use a VCS from www.windsweptsoftware.com but that's more a tool for VB projects although you could also use it in your VBA projects

maybe this one is more what you're looking for

http://www.psiprograms.com/FormatVB.html

and if you want some more choices then this link provides some more
http://www.programmersheaven.com/zone1/cat596/

HTH:O)Bruintje
0
 

Author Comment

by:mathes
ID: 6994261
Hi again,

thank you very much for your links which lead me to source code formatters.

After visiting the links I found out that these formatters are actually bound for
Visual Basic. I know that VBA and VB are very similar, but not identical.
Can you please tell me, if these VB formatters will be able to format VBA sources properly, too?


0
 
LVL 44

Accepted Solution

by:
bruintje earned 100 total points
ID: 6994351
Dear Mathes,

these formatters will do that too, but for them you've to export your modules to .bas files and your classes to .cls files and forms to .frm just like a normal vb project.

this is always a good idea since exported code can be reused in other projects just by importing them again.

so for example, you got project in excel with a module now called module1
-rename it to modADO or something descriptive
-then choose export from the rightclick menu
-export it as modADO.bas to a project directory something called c:\source\xlporjects
-now run of the formatters on the modADO.bas the one at the second link is able to do this others i didn't test

because bas,cls,frm are normal VB files they can be read and modified with the formatters and you can even use them in normal VB projects, in this way i reuse my ADO modules in Office and VB

:O)Bruintje

PS i found only one reference to an VBA specific formatter and that one was made in Word through macros but i couldn't get it because i had to pay for a subscription on the print magazine first
0
 

Author Comment

by:mathes
ID: 6998250
Hi there,

thank you very much for your help. This is exactly what I was looking for.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now