Solved

tool request: VBA source code formatter/beautifier

Posted on 2002-05-03
4
1,834 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …

736 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