Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: help is needed

  1. #11
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default



    [ This Message was edited by: brettvba on 2002-04-30 16:14 ]

  2. #12
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Christchurch New Zealand
    Posts
    1,030
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    or

    Sub CheckValues()
    On Error Resume Next


    If Range("c3", "c5", "c7", "c9", "c11").Cells.SpecialCells(xlCellTypeBlanks).Activate = False Then
    MsgBox "All fields checked for mpty cells - OK to exit", vbInformation + vbOKOnly, "DATABASE CONTROL"
    Workbooks("workbookname.xls").Close SaveChanges:=True
    Exit Sub
    Application.Quit
    Else

    If Range("c3", "c5", "c7", "c9", "c11").Cells.SpecialCells(xlCellTypeBlanks).Activate = True Then
    MsgBox "You must fill in these blank fields", vbCritical + vbOKOnly, "DATABASE CONTROL"
    End If
    End If


    End Sub

    [ This Message was edited by: brettvba on 2002-04-30 16:16 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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