excel vba - how to setup preexisting code

W

whatisexcel

Hi,

I'm trying to use scripts to compare two workbooks (base.xls an
test.xls), I have found two subroutines a
http://www.exceltip.com/st/Compare_two_worksheets_using_VBA_in_Microsoft_Excel/477.htm
which seems to do the trick.

The basic problem I'm having is I don't know how and where to stick i
those two pieces of code. I have gone into base.xls and found th
visual basic editor, then I have stuck both pieces of code int
ThisWorkbook's code section, then I compiled it using the Debug menu,
tried running it, but got a runtime error 9.

Now some questions:
1. I'm a bit confused as to the terms of macro and script, are they th
same thing?
2. Have I stuck the code in the right place?
3. What changes am I supposed to be making to the code? Am I suppose
to comment out the first line of code in the second subroutine? Am
supposed to change the variable name WorkBookName to base.xls?
4. Can I make the whole macro run from a dos command?

Thank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top