View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Running a macro if any data is entered in a range of cells

That's great Jonathan. Glad to be of help.

Regards

Bob


"Jonathan" wrote in message
...
Thanks so much for your help Bob,

I have modified your code to add protection and a helpful message box so
it's all working beautifully.

Thanks again

Jonathan

"Jonathan" wrote:

Hi

I am totally new to VBA and really need to do some help!

I am writing an excel worksheet to send to students practising for multi
choice exams. They are supposed to press a button when they start the

paper
which will then record the start time in a box. I have written a macro

that
does this and protects the cell so that the time cannot then be changed

but I
want it to automatically run if they answer any questions without

pressing
the start button.

My idea for doing this is to use the worksheet_change function to watch

the
cells into which the answers would go (namely C12:F37) and if any of

those
are changed run the starttime macro.

Can anyone tell me how to do this or give me some code that would work.

Many Thanks

Jonathan