Link to home
Start Free TrialLog in
Avatar of onlinemathteacher
onlinemathteacherFlag for United States of America

asked on

RUN TIME ERROR 462 - GRAHAMSCAN HELP?

I have a math test all set up and is attached as a WORD document.  It has 15 questions, each followed by an empty area where students can input work.  After the work area is 4 multiple choice checkboxes where the students can pick the answer that matches their work.  Right now the correct answers are selected, but you can change the selections to test the macro below.  The test has to be located in the C:\ directory for the macro below to find it.

I have an excel file attached which has a macro that goes out and reads the checkboxes and compares them to a table in the Excel file with the correct answers.  The maco fills in a SCORES column for each of 15 questions.  If the student inputs the correct answers the score is 1, if not the score is 0, a SUM function calculates a grade.  If the student inputs more than one checkbox answer, that question is scored as a 0.

The problem is weird.  If I run the macro once, it works.  If I run it again I get an error 462 "The remote server machine does not exist or is unavailable".  Every odd time I run it, it runs.  Every even time I run it it fails.  If I run the macro, hit the reset in the RUN menu, and run it, it runs every time.

What is going on?
student-ct1.doc
temporary2.xls
error-462.jpg
ASKER CERTIFIED SOLUTION
Avatar of bromy2004
bromy2004
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of onlinemathteacher

ASKER

I did not get it to work changing activedocument to appWord, but did if I changed it to docWord.
Going to test it some more, may have another question....

A little confused about why the DIM statements set variables to FORMFIELD but in the text they are used as FORMFIELDS.  The macro does not work if they are used as FORMFIELD in the body; errors.
Seems like a slight mod to the suggested solution works.