Force user to enter info

tphillips

Board Regular
Joined
Jan 28, 2003
Messages
76
I have a spreadsheet where the user enters information in cells A1, B1, C1, then D1. The next day they enter into A2, B2, C2, and D2, and so forth each day. If a user fails to enter data into the D column, after entering into A, B, and C, I want warning to pop-up saying "please enter into D column". I want it to pop-up when they attempt to save the file.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Paste this code in ThisWorkbook:

Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheet1.Range("C65536").End(xlUp).Select
ActiveCell.Offset(0, 1).Range("A1").Select
If Selection = "" Then
Cancel = True
MsgBox "Please enter into D column.", vbExclamation
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,221,692
Messages
6,161,336
Members
451,697
Latest member
pedroDH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top