I’ve got two spreadsheets (“Old” and “New”) and a VB Script macro. The macro runs in one (“New”), does a comparison of the contents of the other (“Old”), and then outputs the results back on to the “New” spreadsheet.
I’d like to build an executable where I input the two file names and click a run button to simplify this procedure. The current procedure requires opening both files, then cutting and pasting the script into the VB editor of “New” and running it there. I’m looking for advice as to what programming language or tools I can use to create this application in Windows XP to run against spreadsheets created in Excel 2007.
Can I use C# to write a simple application that can do this?
If you could point me to resources about writing C# applications to interact with Excel that would be greatly appreciated.
This is my first attempt to write an application that interacts with Excel. Maybe this is not possible. If that’s the case, please let me know that too.
Why not just create an excel File called “Compare.Xls” that will use the following code to allow the user to pick the files and run the Compare on them
It could use some further error checking, like making sure the user didn’t select Cancel or press escape on the File Dialog, but it should allow you to create a button on 1 file and run the comparison from that file on two user selected files.
EDIT: I just thought about this too, you could add a call to your macro in ThisWorkbook under Workbook_Open and have it auto run whenever someone opens up Compare.Xls.