Once again, insert a Module and paste these routines into that one. These are the start up routines that draw controls and write event coding.
Saving the workbook would be a good idea.
Use the VB editors File menu(Excel'98) or Excel menu (2004) to "Close and return to Excel"
Use the Tools - Macro - Macros... to run the macro "BrandNewBook". Save As when prompted. The routine is now ready to go.
To use the routine:
On the ControlPanel sheet, open workbooks, either with Excel or use the button provided.
Select one workbook in each of the two list boxes.
Click the Compare button (suprise!) and they will be compared.
The first three columns of the displayComparison sheet will show a summary by sheets. A sheet will either be unique (no sheet with the same name in the other book), match or MisMatch. The other columns of displayComparison show the contents of those cells that don't match the other sheet. If you double click the summary line of a sheet, you will be taken to the detailed listing for that sheet.
Also, any of the controls can be moved resized etc., button captions can be changed.
Things I need to fix. 1) There are cases where a mismatched cell might be listed twice. 2) The cells are sorted alphabeticaly (A1,A10,A2,B1) it could (should) be sorted bi-modaly A1,A2,A10,B1. 3)Closeing a file should automaticly update the list boxes. As it is, you may have to click the Cancel button to update the list boxes. 4)The Re-Check button on the displayComparison box does not verify that the workbooks are still open, before doing a re-check (and possibly crashing).
Oh, yes one final thing. This routine is not for the PC. If run on a PC, there might be an error in the sub checkArea.
I hope it does what you want it to.
Bookmarks