Results 1 to 16 of 16

Mandatory Field or unable to save based another field having data

Threaded View

  1. #1
    Registered User
    Join Date
    05-24-2013
    Location
    London, ON
    MS-Off Ver
    Excel 2007
    Posts
    43

    Mandatory Field or unable to save based another field having data

    Hello Everyone
    I have a database that I have created (with the welcomed help of others). In order to save the file I want to make cells mandatory based on data in another cell.
    For example if someone adds information to cell C8 then B8 (todays date), E8 (FC Name) and K8 (Status) must have a value. I found this formula which works for B8 but I do not know how to modify it to include E8 and K8. I also needs this formula to repeat for the entire column....spreadsheet has 99 rows.

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

    If Not Sheets("Input").Range("C8") Is Nothing Then
    If Sheets("Input").Range("B8") = vbNullString Then
    MsgBox "You must enter todays date in Column B. Please Revise", vbOKOnly, "Oops"
    Exit Sub
    End If
    End If

    End Sub

    ...any help is greatly appreciated
    Attached Files Attached Files
    Last edited by jingles9; 06-07-2013 at 01:09 PM. Reason: added excel file

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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