Excel - VBA Cell Require Filled

I have an excel worksheet that I want to put some requirement.  I believe this can be done via VBA, but not sure how to approach this.

In Column A, if a cell is filled, I want cells in range column D through F needs to be populated for that row.  If it's not populated, do not allow saving or printing.  Is this easy to do?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Something like this might work:
Dim i, l, r As Range
i = ThisWorkbook.Sheets(1).Range("A" & Rows.Count).End(xlUp).Row
  For l = 1 To i
    If ThisWorkbook.Sheets(1).Range("A" & l).Value <> "" Then
      Set r = ThisWorkbook.Sheets(1).Range("D" & l & ":F" & l)
        For Each cell In r
          If IsEmpty(cell) Then
            MsgBox ("There is an empty cell that needs data")
            Cancel = True
          Exit For
        End If
    End If
  Next l
End Sub

Open in new window

Place this code in the "ThisWorkbook" portion of the editor. If any of the required cells are blank, a message box will pop up.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Martin LissOlder than dirtCommented:
Here's another approach that uses a protected sheet (password = "  ") and a userform.
holemaniaAuthor Commented:

I tried your approach and getting the following error.


Only thing is I don't need the pop-up form.  I'll take a look and see what else can be done.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

holemaniaAuthor Commented:
Looks like I was able to take Flyster and tweaked around and it seems to be working.  Thank you.  Is it possible to focus on the first row with that empty cell?
holemaniaAuthor Commented:
What I meatn is that row 5, column D through F needs to be populated.  However, if E is empty on first row, focus on that cell.  If F happen to be empty, but D and E filled, focus on F?
I noticed I missed the 1st line of my code. It should be:

Sub ConfirmPopulation()
holemaniaAuthor Commented:
yeah I added the "Sub" and it's working.  Possible to focus on the first row with empty cell and highlight anyone of the range cells that's empty?

I can do it if it's a static cell like this:


Just not sure how to make it dynamic so that it focus on the first cell that's empty that is required.
holemaniaAuthor Commented:
Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.