im writing a solution for my boss, but i am struggled with a piece of the solution.. ill explain.
i have 2 excell sheets (file1.xls, file2.xls).
both files contain 2 columns, the first collumn contains variableNames, the 2nd collumn contains the value(data)(numeric).
the 1st collumns of the 2 files are exactly the same.
now i want to write a script that compares the 2 files, then write all the differences into a 3rd file (file3.xls).
somehow i cant imagine a way how to accomplish this.
the nicest thing is a code that i can implement in a new excell sheet(compare.xls) but it may also be a visualStudio script or vb6 or anything else vb (except ASP).
here is an example of how the files look:

thnx in advance,
Tommy
Tommy GarroxPosted Apr 15, 2011, 1:05 AM
i got one directory that contains the 3 files (File1.xls, File2.xls, Vergelijking.xls).
i already launched "msgbox(activeworkbook.path & "File2.xls") to check on the filepath. it was very correct.
no in the last piece of code i have a few lines commented out, if i use them, im gonna compare 2 sheets of the same workbook.
that works like a charm. so the only thing that doesnt work is opening that 2nd workbook.
and i just know its possible!
Suthish NairPosted Apr 14, 2011, 4:10 PM
Suthish NairPosted Apr 14, 2011, 4:05 PM
Tommy GarroxPosted Apr 14, 2011, 4:05 PM
this is what i have now:
now i get the following error: Run-time error '9': Subscript out of range i cant get it to work. File2.xls is in the same directory as the active workbook.when i click on debug, the last sub gets pointed out (yellow bg).
im very sure that the filepath of File2.xls is correct.