VB Code

R

Ray Batig

Greetings,


I have two versions of the same workbook with different versions of VB code.
Is there some software out there that will compare the VB code and show the
differences. The only thing I can think of is printing out both workbook's
codes and then manually comparing them line by line. Any advice will be
appreciated.

Thanks in advance.

Ray
 
J

Jim Cone

Ray,

I've never had a need to compare code modules, but the following wouldn't take long to try out...

Copy the text from both modules into separate columns on a worksheet.
They should both start in the same row.
In an adjoining column use the "Exact" function to determine whether each line is identical;
something like "=EXACT(B5,F5)" and fill down.

This won't identify what was changed, but it will tell you what lines to check.

Regards,
Jim Cone
San Francisco, CA
 
N

Norman Jones

Hi Ray,

Following a suggestion by Dave Peterson (I think), I use Word's compare
documents feature.

Copy each workbook's code to separate files. In Word, open one of the two
files. Tools | Track Changes | Compare Documents. A dialog box will open,
select the second file. All done!
 
D

David McRitchie

Following an archive.org like to the company that did
it's comparison there is a comparison built into Office 2002
see this link: http://www.docucomp.com/
If you don't have Office 2002 or can't locate the features...

You can export source code to two different .txt files
then use CSDiff (free) and is part of a package which is
only free to individuals.
http://www.ComponentSoftware.com/Products/RCS
Don't know what their Excel comparison does, hadn't gone to that page before.
You'll find a much better comparison than trying to compare
on a spreadsheet. [wasn't the link I'd use this was from
it's help file].

But you really want to compare the entire project not just one
module. To see how a comparison with another package
looks here is a comparison of two HTML files you choose which.
http://web.archive.org/web/*dc_/http://www.mvps.org/dmcritchie/excel/excel.htm



--
 
A

Amedee Van Gasse

Ray said:
Greetings,


I have two versions of the same workbook with different versions of
VB code. Is there some software out there that will compare the VB
code and show the differences. The only thing I can think of is
printing out both workbook's codes and then manually comparing them
line by line. Any advice will be appreciated.

Thanks in advance.

Ray

Save the code modules to file (or cut&paste them) and compare them
using EditPad Pro (www.editpadpro.com). The light version is free (as
in beer) and has 99% of the useful features of the full version.
Including also syntax coloring.
 
A

Amedee Van Gasse

Ray said:
Greetings,


I have two versions of the same workbook with different versions of
VB code. Is there some software out there that will compare the VB
code and show the differences. The only thing I can think of is
printing out both workbook's codes and then manually comparing them
line by line. Any advice will be appreciated.

Thanks in advance.

Ray

Total Commander is also very good at comparing files.
I use it often to find changes between 2 versions of the same code.

My other suggestion, EditPad pro, is better for merging 2 versions of a
configuration file, like Apache-style configs.
 
R

Ray Batig

Thanks to all for these suggestions. I have access to Word 2000 and used
that to do the comparison. I found it easiest to Export the modules and
provide a version number in the name. Then compare the files. Like magic,
the differences appeared.

Ray
 
Top