Results 1 to 2 of 2

Thread: Data entry

  1. #1
    Join Date
    Feb 2004

    Angry Unanswered: Data entry

    In a data entry form build in Excel I would like to block the
    posibility to leave some cells blank.

    In the datavalidity function the Ignore blank cells does not
    have any effect, so what can be used to ensure a value is

    best regards

  2. #2
    Join Date
    Dec 2003
    San Diego, CA
    Welcome to the Board!

    If you're using a User Form, it's relatively easy to validate blanks with IF statements. I.E.
    Private Sub TextBox1_Exit
      If TextBox1.Value = "" Then
        MsgBox "You must enter a Value"
      End If
    Exit Sub
    If you're talking about validating a worksheet it's a bit of a different thing. Ignore blanks will only work if a cell has been activated, so 2 options would be to create a VBA routine in either a Private Sub Worksheet_Deactivate event, which goes in the specific sheet module, or a Private Sub Workbook_BeforeClose(Cancel As Boolean) event, which goes in the ThisWorkbook module, to evaluate specific cells for entries. I.E.
    If Sheets("Sheet1").Range("A1").Value = "" Then
      MsgBox "You must enter a value"
    Hope that helps,


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts