Results 1 to 5 of 5

macro for a form properly filled

Threaded View

  1. #1
    Registered User
    Join Date
    09-27-2010
    Location
    london, england
    MS-Off Ver
    Excel 2007
    Posts
    30

    macro for a form properly filled

    what is wrong here?

    Sub save_and_exit()
    AllFilled = True
    For Each cll In Range("a7:a13", "d7:d13", "g7:g13", "a21:a27", "d21:d27", "g21:g27").Cells
      If cll.Value > 0.1 Then
        If Not cll.Offset(, 1) > 0.1 Then
          AllFilled = False
          Exit For
        End If
      End If
    Next cll
    If AllFilled Then
      ActiveWorkbook.Save
      MsgBox "Changes saved"
      Application.Quit
      Else
        MsgBox "Can not save. Cell " & cll.Offset(, 1).Address(False, False)
     End If
    End Sub
    EDIT.

    ok some "" where not supposed to be there. fixed it. how can I make it check the ones on the left as well? meaning, if A is filled so shoould B be. If B is filled so should A
    Last edited by corchox; 10-19-2010 at 06:14 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1