code execution has been interrupted

W

Who I Am

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveWorkbook.Save
End Sub

I put this code into a shared workbook, so the workbook will be saved
whenever a person makes any change.

But this code always generate an error "code execution has been
interrupted" and it stops at the "End Sub".

Why?

H.Z.
 
J

Jim Rech

Your code runs for me. But shouldn't you use the Worksheet_Change event?
Do you need to save every time the user moves the cell selector?

--
Jim
| Private Sub Worksheet_SelectionChange(ByVal Target As Range)
| ActiveWorkbook.Save
| End Sub
|
| I put this code into a shared workbook, so the workbook will be saved
| whenever a person makes any change.
|
| But this code always generate an error "code execution has been
| interrupted" and it stops at the "End Sub".
|
| Why?
|
| H.Z.
|
 

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