I would like some general advice on error handling please.

In my code below once a user has filed out some values on a form the system
tests for a multiuser workbook being open. Only when it gets the book as read
write will it update the workbook then save it.

Could you give me some advice on where to go with the problem of errors
ocuring in the update. e.g. if the user leaves a the date textbox blank or
types text then a error 13 mismatch occurs and the program stops with the
multiuser workbook open.

I would like to avoid this for to reasons. 1. as its password protected i
dont want the users in it.Just the form to update it.
2. if it crashes and a user leaves it open then it will prevent other users
being able to update the data.

My code is below if necessary. Any input would be greatfully appreciated.

Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Do Until issave = True
Dim theBk As Workbook
fto = "Z:\Systemdown\" & CommandN & "\Notes.xls"
Set theBk = Workbooks.Open(FileName:=fto, Password:="thunder",
If theBk.ReadOnly Then
theBk.Close False
issave = False
newrow =
Workbooks("Notes.xls").Sheets("data").Range("A65536").End(xlUp).Row + 1
Workbooks("Notes.xls").Sheets("data").Cells(newrow, 1).Value =
Workbooks("Notes.xls").Sheets("data").Cells(newrow, 2).Value = Now
Workbooks("Notes.xls").Sheets("data").Cells(newrow, 3).Value = namex
Workbooks("Notes.xls").Sheets("data").Cells(newrow, 4).Value = team
Workbooks("Notes.xls").Sheets("data").Cells(newrow, 5).Value =
Workbooks("Notes.xls").Sheets("data").Cells(newrow, 6).Value =

With Workbooks("Notes.xls").Sheets("data").Cells(newrow, 7)
.Value = CDate(TextBox3.Text)
.NumberFormat = "dd-mm-yyyy"
End With

Workbooks("Notes.xls").Sheets("data").Cells(newrow, 8).Value =
Workbooks("Notes.xls").Sheets("data").Cells(newrow, 9).Value =
Workbooks("Notes.xls").Sheets("data").Cells(newrow, 10).Value =

theBk.Close True
Application.ScreenUpdating = True
MsgBox "Records Saved"
Application.ScreenUpdating = False

issave = True

End If
Application.ScreenUpdating = False
Unload Wrapform
End Sub
Regards and Thanks for any assistance.

Francis Brown.