prevent a user leaving a blank cell in excel2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to be able to prevent a user not filling in a required cell in a
worksheet. Anyone got any ideas?
 
Like in another thread, i think the key would be when the users tries to
leave the page.

Try this in VBA:-
Private Sub Worksheet_Deactivate()
If Range("a1") <> True Then
Worksheets("sheet1").Select
MsgBox "You have not completed all the details.", vbCritical, "Incomplete
detail"
End If
End Sub

It wont stop users switching to another workbook, but if you wanted it to,
you could put a similar thing into the workbook module too.
 

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

Back
Top