sharing confilict

G

Guest

I have a workbook with two worksheets. the first sheet is a test, with a
macro at the end. When the macro is clicked a new row is generated at the top
of the second worksheet and information about the test taker is pasted on to
this row. This gives me a log of all who take the test. Here is the problem:
The test is on a network and I would like more then one person to test at the
same time. With my current method a conflict would arise when you go to save
the shared workbook. Thank you in advance,
 
H

Harlan Grove

Manuel said:
I have a workbook with two worksheets. the first sheet is a test, with
a macro at the end. When the macro is clicked a new row is generated at
the top of the second worksheet and information about the test taker is
pasted on to this row. This gives me a log of all who take the test.
Here is the problem: The test is on a network and I would like more then
one person to test at the same time. With my current method a conflict
would arise when you go to save the shared workbook. . . .

You could dabble with shared workbooks, but when one user saves the
workbook, other users could see the first user's answers. You'd want to
avoid that. And if I were taking an exam hosted in an Excel spreadsheet, I'd
want to save every time I answered a question just in case the machine
crashed or the power failed.

A better alternative would be letting all users open the file READ-ONLY, and
upon completing the exam the macro would save a COPY of the file to a
temporary storage location, e.g., the directory pointed to by the user's
TEMP environment variable, then e-mail you a copy of the file as an
attachment. Then you could use a macro in a separate workbook to collect
data from the individual exam workbooks you detach from these e-mails.
 
G

Guest

Thank you for responding,
My log on sheet two only keeps a copy of how they did, and iformation about
them and a date. I failed to mention my macro also prints a copy of the test.
I really don't need an electronic copy. Before the test is taken it would be
cleared.
Question: in a shared invroment would user number 2's file be updated if
user 1 saved his file?

This was my original problem:
because my macro creates a new line to record the informaion on, both users
cannot save the file without one overwriting the other.

Thank you,
 
H

Harlan Grove

Manuel said:
Question: in a shared invroment would user number 2's file be updated if
user 1 saved his file?

Logically, if they can all SAVE their name, date and score in the same file,
they can all save their exam answers in the same file. If you can see all
the results for all exam takers, they can see any exam answers saved by
other exam takers.

You can't have each exam taker get a blank exam when s/he opens the exam
workbook AND have all exam takers' results stored in that same workbook
unless the exam takers use the exam workbook at different times. If they all
need to take the exam at the SAME time, then you can't store all their
results in the exam workbook.

You could use TWO workbooks. The exam workbook would be available to the
exam takers as a READ-ONLY file, and each of them would open a SEPARATE COPY
of the exam workbook. Upon completion, the macro would open a SHARED COMMON
workbook, and enter the exam taker's name, date and score, save the shared
workbook, close it and close the exam workbook.
This was my original problem:
because my macro creates a new line to record the informaion on, both
users cannot save the file without one overwriting the other.

Another, MUCH SIMPLER alternative would be storing results in a text file.
That'd only require a macro statement like

Shell Environ("COMSPEC") & " /c echo " & ResultString & ">>" & ResultFile

where you'd generate ResultString in your macro, containing the exam taker's
name, date of taking the exam, and score, and ResultFile would be the full
pathname to the text file in which you'd store the results.
 
G

Guest

Two work books is a great idea. One for the test and one for the log.

Thank you for your time.
 

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