Mandatory cells only if another cell is filled

abb

Joined
Oct 2, 2017
Messages
2
Reaction score
0
  1. Hey I am New to VBA and I need a little more help. The macro below worked perfectly except I need it to continue to give the error until all columns b-h are completely filled out, also columns d-h are drop downs

    Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
    Set rng = Worksheets("Sheet1").Range("A38:A46")
    For Each cell In rng
    If Not IsEmpty(cell) And IsEmpty(cell.Offset(0, 2)) Then
    Application.Goto cell.Offset(0, 2)
    Cancel = True
    MsgBox "Please fill in cells in column B-H for "

    End If
    Next
    End Sub
 
Back
Top