Solved

tool request: VBA source code formatter/beautifier

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
The blinking Office button 4 43
Excel VB Help 4 51
Excel 2016 Not Responding Issues 6 56
Excel 2010:  VBA Question.  Unable to Run Macro. 2 32
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
My experience with Windows 10 over a one year period and suggestions for smooth operation
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
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…

786 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