Solved

tool request: VBA source code formatter/beautifier

Posted on 2002-05-03
4
1,850 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.

696 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